Fixed sender buffer (push to front if send or select successful).
This commit is contained in:
@@ -230,7 +230,7 @@ SenderThread::Main()
|
|||||||
{
|
{
|
||||||
// Select was successful - store the packet back in the main queue.
|
// Select was successful - store the packet back in the main queue.
|
||||||
boost::mutex::scoped_lock lock(m_sendQueueMutex);
|
boost::mutex::scoped_lock lock(m_sendQueueMutex);
|
||||||
m_sendQueue.push_back(tmpData);
|
m_sendQueue.push_front(tmpData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // other errors than would block
|
else // other errors than would block
|
||||||
@@ -249,7 +249,7 @@ SenderThread::Main()
|
|||||||
tmpData.bytesSent += bytesSent;
|
tmpData.bytesSent += bytesSent;
|
||||||
// Send was partly successful - store the packet back in the main queue.
|
// Send was partly successful - store the packet back in the main queue.
|
||||||
boost::mutex::scoped_lock lock(m_sendQueueMutex);
|
boost::mutex::scoped_lock lock(m_sendQueueMutex);
|
||||||
m_sendQueue.push_back(tmpData);
|
m_sendQueue.push_front(tmpData);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Msleep(SEND_TIMEOUT_MSEC);
|
Msleep(SEND_TIMEOUT_MSEC);
|
||||||
|
|||||||
Reference in New Issue
Block a user