summaryrefslogtreecommitdiff
path: root/java/src/IceInternal/IncomingConnectionFactory.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/IceInternal/IncomingConnectionFactory.java')
-rw-r--r--java/src/IceInternal/IncomingConnectionFactory.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/java/src/IceInternal/IncomingConnectionFactory.java b/java/src/IceInternal/IncomingConnectionFactory.java
index 60911ecf5aa..34e0d2bc487 100644
--- a/java/src/IceInternal/IncomingConnectionFactory.java
+++ b/java/src/IceInternal/IncomingConnectionFactory.java
@@ -448,11 +448,14 @@ public final class IncomingConnectionFactory extends EventHandler
//
// Clean up for finalizer.
//
- _state = StateClosed;
- _acceptor = null;
- _connections = null;
- _threadPerIncomingConnectionFactory = null;
- super.destroy();
+ synchronized(this)
+ {
+ _state = StateClosed;
+ _acceptor = null;
+ _connections = null;
+ _threadPerIncomingConnectionFactory = null;
+ super.destroy();
+ }
Ice.SyscallException e = new Ice.SyscallException();
e.initCause(ex);