diff options
Diffstat (limited to 'zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxn.java')
-rw-r--r-- | zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxn.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxn.java b/zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxn.java index 4f9d18b80..5341f5761 100644 --- a/zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxn.java +++ b/zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxn.java @@ -1114,6 +1114,7 @@ public class ClientCnxn { private static final String RETRY_CONN_MSG = ", closing socket connection and attempting reconnect"; @Override + @SuppressFBWarnings("JLM_JSR166_UTILCONCURRENT_MONITORENTER") public void run() { clientCnxnSocket.introduce(this, sessionId, outgoingQueue); clientCnxnSocket.updateNow(); @@ -1256,7 +1257,7 @@ public class ClientCnxn { } } } - synchronized (state) { + synchronized (outgoingQueue) { // When it comes to this point, it guarantees that later queued // packet to outgoingQueue will be notified of death. cleanup(); @@ -1589,6 +1590,7 @@ public class ClientCnxn { ctx, watchRegistration, null); } + @SuppressFBWarnings("JLM_JSR166_UTILCONCURRENT_MONITORENTER") public Packet queuePacket(RequestHeader h, ReplyHeader r, Record request, Record response, AsyncCallback cb, String clientPath, String serverPath, Object ctx, WatchRegistration watchRegistration, @@ -1608,7 +1610,7 @@ public class ClientCnxn { // 1. synchronize with the final cleanup() in SendThread.run() to avoid race // 2. synchronized against each packet. So if a closeSession packet is added, // later packet will be notified. - synchronized (state) { + synchronized (outgoingQueue) { if (!state.isAlive() || closing) { conLossPacket(packet); } else { |