Skip to content

Commit 0e271e4

Browse files
committed
Debug
1 parent 4594c67 commit 0e271e4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/main/java/com/timgroup/statsd/UnixStreamClientChannel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
import jnr.unixsocket.UnixSocketOptions;
66

77
import java.io.IOException;
8+
import java.lang.reflect.Method;
89
import java.net.SocketAddress;
910
import java.nio.ByteBuffer;
1011
import java.nio.ByteOrder;
1112
import java.nio.channels.SocketChannel;
12-
import java.lang.reflect.Method;
1313

1414
/**
1515
* A ClientChannel for Unix domain sockets.

src/test/java/com/timgroup/statsd/UnixDatagramSocketDummyStatsDServer.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
public class UnixDatagramSocketDummyStatsDServer extends DummyStatsDServer {
1313
private final DatagramChannel server;
14-
private volatile boolean running = true;
14+
private volatile boolean serverRunning = true;
1515

1616
public UnixDatagramSocketDummyStatsDServer(String socketPath) throws IOException {
1717
if (ClientChannelUtils.hasNativeUdsSupport()) {
@@ -35,7 +35,7 @@ public UnixDatagramSocketDummyStatsDServer(String socketPath) throws IOException
3535

3636
@Override
3737
protected boolean isOpen() {
38-
return running && server.isOpen();
38+
return serverRunning && server.isOpen();
3939
}
4040

4141
protected void receive(ByteBuffer packet) throws IOException {
@@ -44,12 +44,12 @@ protected void receive(ByteBuffer packet) throws IOException {
4444

4545
@Override
4646
public void close() throws IOException {
47-
running = false; // Signal the listening thread to stop
47+
serverRunning = false;
4848
try {
4949
// Give the listening thread a chance to stop
50-
Thread.sleep(50);
50+
Thread.sleep(1000);
5151
} catch (InterruptedException e) {
52-
// Ignore
52+
// ignore
5353
}
5454
try {
5555
server.close();

0 commit comments

Comments
 (0)