mirror of https://github.com/apache/activemq.git
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1188925 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ef850895a2
commit
28e9cd7eee
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
gxfdgvdfg * Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
|
@ -537,27 +537,33 @@ public class TcpTransport extends TransportThreadSupport implements Transport, S
|
|||
final CountDownLatch latch = new CountDownLatch(1);
|
||||
|
||||
DefaultThreadPools.getDefaultTaskRunnerFactory().execute(new Runnable() {
|
||||
|
||||
public void run() {
|
||||
try {
|
||||
socket.close();
|
||||
} catch (IOException e) {
|
||||
LOG.debug("Caught exception closing socket",e);
|
||||
}finally {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Caught exception closing socket", e);
|
||||
}
|
||||
} finally {
|
||||
latch.countDown();
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
latch.await(1,TimeUnit.SECONDS);
|
||||
}else {
|
||||
|
||||
try {
|
||||
latch.await(1,TimeUnit.SECONDS);
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
try {
|
||||
socket.close();
|
||||
} catch (IOException e) {
|
||||
LOG.debug("Caught exception closing socket",e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue