diff options
author | Joe George <joe@zeroc.com> | 2015-09-11 14:30:00 -0400 |
---|---|---|
committer | Joe George <joe@zeroc.com> | 2015-09-11 14:30:00 -0400 |
commit | b9c2a6f6628476f11c78a7de2adc90edca1e209e (patch) | |
tree | df192d87dfbc594a7a2b52a96b5145ad3156d26f /cpp/src/Ice/StreamSocket.cpp | |
parent | ICE-6645 Removed hack to keep binary compatibility in Ice 3.6.1 (diff) | |
parent | Removed ARM configuraton from WinRT testsuite solutions (diff) | |
download | ice-b9c2a6f6628476f11c78a7de2adc90edca1e209e.tar.bz2 ice-b9c2a6f6628476f11c78a7de2adc90edca1e209e.tar.xz ice-b9c2a6f6628476f11c78a7de2adc90edca1e209e.zip |
Merge remote-tracking branch 'origin/3.6'
Diffstat (limited to 'cpp/src/Ice/StreamSocket.cpp')
-rw-r--r-- | cpp/src/Ice/StreamSocket.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cpp/src/Ice/StreamSocket.cpp b/cpp/src/Ice/StreamSocket.cpp index 7ade8172ba4..8eb3a23daf9 100644 --- a/cpp/src/Ice/StreamSocket.cpp +++ b/cpp/src/Ice/StreamSocket.cpp @@ -105,7 +105,7 @@ StreamSocket::connect(Buffer& readBuffer, Buffer& writeBuffer) bool StreamSocket::isConnected() { - return _state == StateConnected; + return _state == StateConnected && _fd != INVALID_SOCKET; } size_t @@ -377,7 +377,7 @@ StreamSocket::startWrite(Buffer& buf) void StreamSocket::finishWrite(Buffer& buf) { - if(_state < StateConnected && _state != StateProxyWrite) + if(_fd == INVALID_SOCKET || (_state < StateConnected && _state != StateProxyWrite)) { return; } @@ -439,6 +439,11 @@ StreamSocket::startRead(Buffer& buf) void StreamSocket::finishRead(Buffer& buf) { + if(_fd == INVALID_SOCKET) + { + return; + } + if(static_cast<int>(_read.count) == SOCKET_ERROR) { WSASetLastError(_read.error); |