diff options
| author | Vincent-Michael <Vincent_Michael@gmx.de> | 2014-08-27 23:06:40 +0200 |
|---|---|---|
| committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2014-08-27 23:06:40 +0200 |
| commit | c0c708cf02631118eaab093c43ab8c0b88dcbae2 (patch) | |
| tree | 58a821030610675495563817dac969be7d19f26d /src/server/worldserver/RemoteAccess | |
| parent | b56e7f2ec6c606d413f2e3c0868eeced24d687aa (diff) | |
| parent | 00475facf257c5bb4ffa76086d91bb82a8c2113b (diff) | |
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts:
src/server/game/Scripting/ScriptMgr.h
Diffstat (limited to 'src/server/worldserver/RemoteAccess')
| -rw-r--r-- | src/server/worldserver/RemoteAccess/RASession.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/worldserver/RemoteAccess/RASession.cpp b/src/server/worldserver/RemoteAccess/RASession.cpp index bc15952cb37..18217d4e882 100644 --- a/src/server/worldserver/RemoteAccess/RASession.cpp +++ b/src/server/worldserver/RemoteAccess/RASession.cpp @@ -31,12 +31,12 @@ using boost::asio::ip::tcp; void RASession::Start() { - boost::asio::socket_base::bytes_readable command(true); - _socket.io_control(command); - std::size_t bytes_readable = command.get(); + // wait 1 second for active connections to send negotiation request + for (int counter = 0; counter < 10 && _socket.available() == 0; counter++) + std::this_thread::sleep_for(std::chrono::milliseconds(100)); // Check if there are bytes available, if they are, then the client is requesting the negotiation - if (bytes_readable > 0) + if (_socket.available() > 0) { // Handle subnegotiation boost::array<char, 1024> buf; |
