As go captures by reference the callbacks hold pinger by reference and they will all wind up taking the source from the last pinger the loop processes.
Assigning source to a local variable that ensures that each pinger's callbacks capture a reference to that variable which is unique to each pinger and hence that the correct source is reported.
This is built on #141 to avoid conflicts.
As go captures by reference the callbacks hold
pinger
by reference and they will all wind up taking the source from the last pinger the loop processes.Assigning source to a local variable that ensures that each pinger's callbacks capture a reference to that variable which is unique to each pinger and hence that the correct source is reported.