diff options
author | Matthew Newhook <matthew@zeroc.com> | 2005-09-26 07:42:44 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2005-09-26 07:42:44 +0000 |
commit | fd213d9ad0de673b5710cc075d55135564c3bfdf (patch) | |
tree | 2ecebdbe0870c1bcefd5bb8415477a31ef531036 | |
parent | Got rid of duplicate project UUID. (diff) | |
download | ice-fd213d9ad0de673b5710cc075d55135564c3bfdf.tar.bz2 ice-fd213d9ad0de673b5710cc075d55135564c3bfdf.tar.xz ice-fd213d9ad0de673b5710cc075d55135564c3bfdf.zip |
http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=481
-rwxr-xr-x | cs/src/Ice/ConnectionI.cs | 22 | ||||
-rwxr-xr-x | cs/src/Ice/Network.cs | 4 | ||||
-rwxr-xr-x | cs/src/Ice/OutgoingAsync.cs | 4 |
3 files changed, 16 insertions, 14 deletions
diff --git a/cs/src/Ice/ConnectionI.cs b/cs/src/Ice/ConnectionI.cs index 27c91f59222..d5b87a4c14b 100755 --- a/cs/src/Ice/ConnectionI.cs +++ b/cs/src/Ice/ConnectionI.cs @@ -185,7 +185,7 @@ namespace Ice { if(_acmTimeout > 0) { - _acmAbsoluteTimeoutMillis = System.DateTime.Now.Ticks / 10 + _acmTimeout * 1000; + _acmAbsoluteTimeoutMillis = System.DateTime.Now.Ticks / 10000 + _acmTimeout * 1000; } // @@ -337,7 +337,7 @@ namespace Ice if(_state != StateClosed && _endpoint.timeout() >= 0) { long absoluteWaitTime = _stateTime + _endpoint.timeout(); - int waitTime = (int)(absoluteWaitTime - System.DateTime.Now.Ticks / 10); + int waitTime = (int)(absoluteWaitTime - System.DateTime.Now.Ticks / 10000); if(waitTime > 0) { @@ -346,7 +346,7 @@ namespace Ice // this connection. // Monitor.Wait(this, waitTime); - if(System.DateTime.Now.Ticks / 10 >= absoluteWaitTime) + if(System.DateTime.Now.Ticks / 10000 >= absoluteWaitTime) { setState(StateClosed, new CloseTimeoutException()); } @@ -418,7 +418,7 @@ namespace Ice !_batchStreamInUse && _batchStream.isEmpty() && _dispatchCount == 0) { - if(System.DateTime.Now.Ticks / 10 >= _acmAbsoluteTimeoutMillis) + if(System.DateTime.Now.Ticks / 10000 >= _acmAbsoluteTimeoutMillis) { setState(StateClosing, new ConnectionTimeoutException()); return; @@ -567,7 +567,7 @@ namespace Ice if(_acmTimeout > 0) { - _acmAbsoluteTimeoutMillis = System.DateTime.Now.Ticks / 10 + _acmTimeout * 1000; + _acmAbsoluteTimeoutMillis = System.DateTime.Now.Ticks / 10000 + _acmTimeout * 1000; } } @@ -671,7 +671,7 @@ namespace Ice if(_acmTimeout > 0) { - _acmAbsoluteTimeoutMillis = System.DateTime.Now.Ticks / 10 + _acmTimeout * 1000; + _acmAbsoluteTimeoutMillis = System.DateTime.Now.Ticks / 10000 + _acmTimeout * 1000; } } @@ -872,7 +872,7 @@ namespace Ice if(_acmTimeout > 0) { - _acmAbsoluteTimeoutMillis = System.DateTime.Now.Ticks / 10 + _acmTimeout * 1000; + _acmAbsoluteTimeoutMillis = System.DateTime.Now.Ticks / 10000 + _acmTimeout * 1000; } // @@ -976,7 +976,7 @@ namespace Ice if(_acmTimeout > 0) { - _acmAbsoluteTimeoutMillis = System.DateTime.Now.Ticks / 10 + _acmTimeout * 1000; + _acmAbsoluteTimeoutMillis = System.DateTime.Now.Ticks / 10000 + _acmTimeout * 1000; } } catch(LocalException ex) @@ -1305,7 +1305,7 @@ namespace Ice _batchRequestCompress = false; _dispatchCount = 0; _state = StateNotValidated; - _stateTime = System.DateTime.Now.Ticks / 10; + _stateTime = System.DateTime.Now.Ticks / 10000; if(_endpoint.datagram()) { @@ -1632,7 +1632,7 @@ namespace Ice } _state = state; - _stateTime = System.DateTime.Now.Ticks / 10; + _stateTime = System.DateTime.Now.Ticks / 10000; Monitor.PulseAll(this); @@ -1726,7 +1726,7 @@ namespace Ice if(_acmTimeout > 0) { - _acmAbsoluteTimeoutMillis = System.DateTime.Now.Ticks / 10 + _acmTimeout * 1000; + _acmAbsoluteTimeoutMillis = System.DateTime.Now.Ticks / 10000 + _acmTimeout * 1000; } try diff --git a/cs/src/Ice/Network.cs b/cs/src/Ice/Network.cs index e34225d91f9..96175663f5b 100755 --- a/cs/src/Ice/Network.cs +++ b/cs/src/Ice/Network.cs @@ -29,6 +29,7 @@ namespace IceInternal // const int WSAEINTR = 10004; const int WSAEFAULT = 10014; + const int WSAEINVAL = 10022; const int WSAEWOULDBLOCK = 10035; const int WSAEINPROGRESS = 10036; // Deprecated in winsock2, but still used by Mono Beta 1 const int WSAEMSGSIZE = 10040; @@ -110,7 +111,8 @@ namespace IceInternal public static bool notConnected(Win32Exception ex) { - return ex.NativeErrorCode == WSAENOTCONN; + // BUGFIX: WSAEINVAL because shutdown() under MacOS returns EINVAL if the server side is gone. + return ex.NativeErrorCode == WSAENOTCONN || ex.NativeErrorCode == WSAEINVAL; } public static bool recvTruncated(Win32Exception ex) diff --git a/cs/src/Ice/OutgoingAsync.cs b/cs/src/Ice/OutgoingAsync.cs index 8541ed575c7..1ea84c4aae8 100755 --- a/cs/src/Ice/OutgoingAsync.cs +++ b/cs/src/Ice/OutgoingAsync.cs @@ -241,7 +241,7 @@ namespace IceInternal if(absoluteTimeoutMillis > 0) { - return System.DateTime.Now.Ticks / 10 >= absoluteTimeoutMillis; + return System.DateTime.Now.Ticks / 10000 >= absoluteTimeoutMillis; } else { @@ -357,7 +357,7 @@ namespace IceInternal { if(_connection.timeout() >= 0) { - _absoluteTimeoutMillis = System.DateTime.Now.Ticks / 10 + _connection.timeout(); + _absoluteTimeoutMillis = System.DateTime.Now.Ticks / 10000 + _connection.timeout(); } else { |