summaryrefslogtreecommitdiff
path: root/lib/server
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2008-03-29 01:54:28 +0000
committerChris Wilson <chris+github@qwirx.com>2008-03-29 01:54:28 +0000
commite7755f99f95f9dced89c3a97cf461f134dd779c3 (patch)
tree197110e7c549a5bb9f56288639fae66bff5d63d6 /lib/server
parent732bdbdaacb429c94c4120070e531038e3d6f132 (diff)
Close after logging socket error, so that we don't lose errno.
Diffstat (limited to 'lib/server')
-rw-r--r--lib/server/SocketStream.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/server/SocketStream.cpp b/lib/server/SocketStream.cpp
index 13f7c310..31a3b3ee 100644
--- a/lib/server/SocketStream.cpp
+++ b/lib/server/SocketStream.cpp
@@ -170,10 +170,10 @@ void SocketStream::Open(int Type, const char *Name, int Port)
", port " << Port << ")", err);
#else // !WIN32
int err = errno;
- ::close(mSocketHandle);
BOX_LOG_SYS_ERROR("Failed to connect to socket (type " <<
Type << ", name " << Name << ", port " << Port <<
")");
+ ::close(mSocketHandle);
#endif // WIN32
mSocketHandle = INVALID_SOCKET_VALUE;