java-dogstatsd-client icon indicating copy to clipboard operation
java-dogstatsd-client copied to clipboard

Fix UnixSocketTest#resist_dsd_restart

Open vickenty opened this issue 3 years ago • 0 comments

Avoid sending too many metrics to a closed socket, to avoid a race condition with the lastException reset.

Occasionally, two metrics will be sent to the client after the server socket was removed. First one triggers an exception and causes the send loop to break. Test case then resets the lastException variable, while the client is still running and has another message buffered. If that is delivered before the server is started, it triggers another exception and causes nullValue() check to fail and the end of the test case.

vickenty avatar Sep 02 '22 15:09 vickenty