mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 18:20:26 +01:00
fix for socket poll() crash when (fd == -1)
This commit is contained in:
parent
3878959ac0
commit
5f35304974
@ -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<const char*>(&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;
|
||||
|
Loading…
Reference in New Issue
Block a user