mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 08:00:38 +03:00
Enter state BEFORE reading data to avoid race conditions
This commit is contained in:
parent
e228ba963d
commit
bc78460f63
2
SOCKS.h
2
SOCKS.h
@ -133,7 +133,7 @@ namespace proxy
|
|||||||
SOCKSHandler(SOCKSServer * parent, boost::asio::ip::tcp::socket * sock) :
|
SOCKSHandler(SOCKSServer * parent, boost::asio::ip::tcp::socket * sock) :
|
||||||
m_parent(parent), m_sock(sock), m_stream(nullptr),
|
m_parent(parent), m_sock(sock), m_stream(nullptr),
|
||||||
m_authchosen(AUTH_UNACCEPTABLE), m_addrtype(ADDR_IPV4), dead(false)
|
m_authchosen(AUTH_UNACCEPTABLE), m_addrtype(ADDR_IPV4), dead(false)
|
||||||
{ m_address.ip = 0; AsyncSockRead(); EnterState(GET_SOCKSV); }
|
{ m_address.ip = 0; EnterState(GET_SOCKSV); AsyncSockRead(); }
|
||||||
~SOCKSHandler() { Terminate(); }
|
~SOCKSHandler() { Terminate(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user