Skip to content

Commit 08f24cb

Browse files
author
Marian Krivos
committed
recommit of lost change - SIGSEGV on poll() with socfd == -1
1 parent c76ec8b commit 08f24cb

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Net/src/SocketImpl.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,10 @@ int SocketImpl::available()
347347

348348
bool SocketImpl::poll(const Poco::Timespan& timeout, int mode)
349349
{
350+
// Marian Krivos - 28.05.2009
351+
// crash fix: SIGSEGV on linux when _sockfd == -1
352+
poco_assert (_sockfd != POCO_INVALID_SOCKET);
353+
350354
#if defined(POCO_HAVE_FD_POLL)
351355
pollfd pollBuf;
352356

0 commit comments

Comments
 (0)