summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/TcpTransceiver.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2003-05-09 23:44:04 +0000
committerMark Spruiell <mes@zeroc.com>2003-05-09 23:44:04 +0000
commit08178d41304a3f8b0dda4b82b10e25fb2288c86b (patch)
treed408837cc6b5daae9eb2c5eabb72a82a411229c5 /cpp/src/Ice/TcpTransceiver.cpp
parentChanged library names on Windows for Ice 1.1 (diff)
downloadice-08178d41304a3f8b0dda4b82b10e25fb2288c86b.tar.bz2
ice-08178d41304a3f8b0dda4b82b10e25fb2288c86b.tar.xz
ice-08178d41304a3f8b0dda4b82b10e25fb2288c86b.zip
cache fdToString results to avoid exception when connection is shutdown on
Solaris
Diffstat (limited to 'cpp/src/Ice/TcpTransceiver.cpp')
-rw-r--r--cpp/src/Ice/TcpTransceiver.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/cpp/src/Ice/TcpTransceiver.cpp b/cpp/src/Ice/TcpTransceiver.cpp
index f4fbd688dde..1cf903bcfc2 100644
--- a/cpp/src/Ice/TcpTransceiver.cpp
+++ b/cpp/src/Ice/TcpTransceiver.cpp
@@ -280,7 +280,7 @@ IceInternal::TcpTransceiver::read(Buffer& buf, int timeout)
string
IceInternal::TcpTransceiver::toString() const
{
- return fdToString(_fd);
+ return _desc;
}
IceInternal::TcpTransceiver::TcpTransceiver(const InstancePtr& instance, SOCKET fd) :
@@ -292,6 +292,11 @@ IceInternal::TcpTransceiver::TcpTransceiver(const InstancePtr& instance, SOCKET
{
FD_ZERO(&_rFdSet);
FD_ZERO(&_wFdSet);
+
+ //
+ // fdToString may raise a socket exception.
+ //
+ const_cast<string&>(_desc) = fdToString(_fd);
}
IceInternal::TcpTransceiver::~TcpTransceiver()