diff --git a/Net/src/SocketImpl.cpp b/Net/src/SocketImpl.cpp index 10bf101d2..da11110ee 100644 --- a/Net/src/SocketImpl.cpp +++ b/Net/src/SocketImpl.cpp @@ -329,6 +329,8 @@ int SocketImpl::receiveFrom(void* buffer, int length, SocketAddress& address, in void SocketImpl::sendUrgent(unsigned char data) { + poco_assert (_sockfd != POCO_INVALID_SOCKET); + int rc = ::send(_sockfd, reinterpret_cast(&data), sizeof(data), MSG_OOB); if (rc < 0) error(); } @@ -344,6 +346,8 @@ int SocketImpl::available() bool SocketImpl::poll(const Poco::Timespan& timeout, int mode) { + poco_assert (_sockfd != POCO_INVALID_SOCKET); + #if defined(POCO_HAVE_FD_POLL) pollfd pollBuf;