diff options
Diffstat (limited to 'java/src/IceInternal/OutgoingConnectionFactory.java')
-rw-r--r-- | java/src/IceInternal/OutgoingConnectionFactory.java | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/java/src/IceInternal/OutgoingConnectionFactory.java b/java/src/IceInternal/OutgoingConnectionFactory.java index 2755c7cc417..8ed9c8fb6a4 100644 --- a/java/src/IceInternal/OutgoingConnectionFactory.java +++ b/java/src/IceInternal/OutgoingConnectionFactory.java @@ -259,7 +259,22 @@ public class OutgoingConnectionFactory { Connector connector = endpoint.connector(); assert(connector != null); - transceiver = connector.connect(endpoint.timeout()); + + int timeout; + DefaultsAndOverrides defaultsAndOverrides = _instance.defaultsAndOverrides(); + if(defaultsAndOverrides.overrideConnectTimeout) + { + timeout = defaultsAndOverrides.overrideConnectTimeoutValue; + } + // It is not necessary to check for overrideTimeout, + // the endpoint has already been modified with this + // override, if set. + else + { + timeout = endpoint.timeout(); + } + + transceiver = connector.connect(timeout); assert(transceiver != null); } connection = new Connection(_instance, transceiver, endpoint, null); |