File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed
src/test/java/com/timgroup/statsd Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change 1111
1212public class UnixDatagramSocketDummyStatsDServer extends DummyStatsDServer {
1313 private final DatagramChannel server ;
14- private volatile boolean running = true ;
1514
1615 public UnixDatagramSocketDummyStatsDServer (String socketPath ) throws IOException {
1716 if (ClientChannelUtils .hasNativeUdsSupport ()) {
@@ -35,22 +34,14 @@ public UnixDatagramSocketDummyStatsDServer(String socketPath) throws IOException
3534
3635 @ Override
3736 protected boolean isOpen () {
38- return running && server .isOpen ();
37+ return server .isOpen ();
3938 }
4039
4140 protected void receive (ByteBuffer packet ) throws IOException {
4241 server .receive (packet );
4342 }
4443
45- @ Override
4644 public void close () throws IOException {
47- running = false ; // Signal the listening thread to stop
48- try {
49- // Give the listening thread a chance to stop
50- Thread .sleep (50 );
51- } catch (InterruptedException e ) {
52- // Ignore
53- }
5445 try {
5546 server .close ();
5647 } catch (Exception e ) {
You can’t perform that action at this time.
0 commit comments