Fix high-bandwidth stuff with inspsocket+ssl, and eagain

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6699 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
brain 2007-03-22 20:21:03 +00:00
parent 70f57afea5
commit 636f6a023f

View File

@ -472,7 +472,7 @@ bool InspSocket::FlushWriteBuffer()
int result = Instance->Config->GetIOHook(this)->OnRawSocketWrite(this->fd, outbuffer[0].c_str(), outbuffer[0].length()); int result = Instance->Config->GetIOHook(this)->OnRawSocketWrite(this->fd, outbuffer[0].c_str(), outbuffer[0].length());
if (result > 0) if (result > 0)
{ {
if ((unsigned int)result == outbuffer[0].length()) if ((unsigned int)result >= outbuffer[0].length())
{ {
outbuffer.pop_front(); outbuffer.pop_front();
} }
@ -510,7 +510,7 @@ bool InspSocket::FlushWriteBuffer()
int result = write(this->fd,outbuffer[0].c_str(),outbuffer[0].length()); int result = write(this->fd,outbuffer[0].c_str(),outbuffer[0].length());
if (result > 0) if (result > 0)
{ {
if ((unsigned int)result == outbuffer[0].length()) if ((unsigned int)result >= outbuffer[0].length())
{ {
/* The whole block was written (usually a line) /* The whole block was written (usually a line)
* Pop the block off the front of the queue, * Pop the block off the front of the queue,