fixed race condition

This commit is contained in:
orignal 2014-10-05 21:59:05 -04:00
parent 78fc3876e6
commit 0f3a68cd8e
4 changed files with 11 additions and 0 deletions

2
SAM.h
View file

@ -6,6 +6,7 @@
#include <map>
#include <list>
#include <thread>
#include <mutex>
#include <boost/asio.hpp>
#include "Identity.h"
#include "LeaseSet.h"
@ -144,6 +145,7 @@ namespace stream
boost::asio::io_service m_Service;
boost::asio::ip::tcp::acceptor m_Acceptor;
SAMSocket * m_NewSocket;
std::mutex m_SessionsMutex;
std::map<std::string, SAMSession> m_Sessions;
};
}