diff options
-rw-r--r-- | src/Socket.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Socket.cc b/src/Socket.cc index ba528aa..4ef9942 100644 --- a/src/Socket.cc +++ b/src/Socket.cc @@ -280,6 +280,8 @@ Balau::Socket::Socket(int fd) : m_fd(fd), m_connected(true), m_connecting(false) } void Balau::Socket::close() throw (GeneralException) { + if (m_fd < 0) + return; #ifdef _WIN32 closesocket(m_fd); WSACleanup(); |