summaryrefslogtreecommitdiff
path: root/sal/osl/unx/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'sal/osl/unx/socket.c')
-rw-r--r--sal/osl/unx/socket.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sal/osl/unx/socket.c b/sal/osl/unx/socket.c
index c901aa7b505d..c8faf6c028f5 100644
--- a/sal/osl/unx/socket.c
+++ b/sal/osl/unx/socket.c
@@ -1858,6 +1858,9 @@ void SAL_CALL osl_closeSocket(oslSocket pSocket)
pSocket->m_nLastError=0;
nFD = pSocket->m_Socket;
+ if (nFD == OSL_INVALID_SOCKET)
+ return;
+
pSocket->m_Socket = OSL_INVALID_SOCKET;
#if defined(LINUX)
@@ -1904,6 +1907,7 @@ void SAL_CALL osl_closeSocket(oslSocket pSocket)
#endif /* OSL_DEBUG_LEVEL */
close(nConnFD);
}
+ pSocket->m_bIsAccepting = sal_False;
}
#endif /* LINUX */