summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2008-03-17 10:36:13 +0000
committerMartin Ritchie <ritchiem@apache.org>2008-03-17 10:36:13 +0000
commitf2235c6a4674c2be1698374ea13086adaaf0fbf1 (patch)
tree576704387baa5920766515507b0e80956563decf /java
parentc3261dda6943ab10b9193a4fe7a54016df69a469 (diff)
downloadqpid-python-f2235c6a4674c2be1698374ea13086adaaf0fbf1.tar.gz
QPID-856 : Moved unbind out of the synchronized block as it doesn't need to be done there.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2.1@637828 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/transport/TransportConnection.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/transport/TransportConnection.java b/java/client/src/main/java/org/apache/qpid/client/transport/TransportConnection.java
index 78b54a8de9..2a5365c322 100644
--- a/java/client/src/main/java/org/apache/qpid/client/transport/TransportConnection.java
+++ b/java/client/src/main/java/org/apache/qpid/client/transport/TransportConnection.java
@@ -332,16 +332,21 @@ public class TransportConnection
public static void killVMBroker(int port)
{
+ VmPipeAddress pipe;
synchronized (_inVmPipeAddress)
{
- VmPipeAddress pipe = (VmPipeAddress) _inVmPipeAddress.get(port);
+ pipe = (VmPipeAddress) _inVmPipeAddress.get(port);
if (pipe != null)
{
_logger.info("Killing VM Broker:" + port);
_inVmPipeAddress.remove(port);
- _acceptor.unbind(pipe);
}
}
+ //This doesn't need to be sychronized
+ if (pipe != null)
+ {
+ _acceptor.unbind(pipe);
+ }
}
}