mozilla / ping-centre

INACTIVE - http://mzl.la/ghe-archive
Mozilla Public License 2.0
8 stars 10 forks source link

Don't assign data payloads to the client instance #10

Closed jaredlockhart closed 8 years ago

jaredlockhart commented 8 years ago

https://github.com/mozilla/ping-centre/blob/master/ping-centre.js#L30-L31

Here we're assigning the data payload to the client instance and resetting, however this can easily cause race conditions where two concurrent callers can overwrite one anothers payloads and lose data easily. The payload only needs to exist for the duration of the send ping call scope.