Fixed a problem in the SenderThread, where packet order was not maintained when a session had stalled packets in the send buffer.

This commit is contained in:
lotodore
2008-04-23 21:19:00 +00:00
parent 85435f0ce5
commit df97fcc725
3 changed files with 44 additions and 19 deletions
+4
View File
@@ -56,6 +56,7 @@ protected:
unsigned bytesSent;
};
typedef std::list<SendData> SendDataList;
typedef std::list<SessionId> SessionIdList;
// Main function of the thread.
virtual void Main();
@@ -71,6 +72,9 @@ private:
SendDataList m_stalledQueue;
mutable boost::mutex m_stalledQueueMutex;
SessionIdList m_sessionsStalled; // Cache
mutable boost::mutex m_sessionsStalledMutex;
SenderCallback &m_callback;
boost::timers::portable::microsec_timer m_logTimer;