java-dogstatsd-client
java-dogstatsd-client copied to clipboard
Clear buffers before returning them to the pool
After an unsuccessful write, StatsDSender would not clear the buffer before returning it to the pool. This could cause the processor to get the buffer with lim<cap, possibly failing to write to the buffer and incorrectly submitting it to the sender again with pos=0 (which results in a no-op write, because after .flip() buffer would have pos=0,lim=0).
Fixes #198