Bugfixes for the socket subsystem.

This commit is contained in:
Gunnar Beutner 2013-04-02 11:08:08 +02:00
parent acfa3e6475
commit 8ac0a80101
2 changed files with 8 additions and 1 deletions

View File

@ -538,6 +538,13 @@ void Socket::HandleWritableClient(void)
rc = send(GetFD(), data, count, 0);
#ifdef _WIN32
if (rc < 0 && WSAGetLastError() == WSAEWOULDBLOCK)
#else /* _WIN32 */
if (rc < 0 && errno == EAGAIN)
#endif /* _WIN32 */
break;
if (rc <= 0) {
#ifndef _WIN32
BOOST_THROW_EXCEPTION(socket_error()

View File

@ -293,5 +293,5 @@ void TlsStream::Write(const void *buffer, size_t count)
m_SendQueue->Write(buffer, count);
}
HandleIO();
Utility::QueueAsyncCallback(boost::bind(&TlsStream::HandleIO, this));
}