forked from p15670423/monkey
Agent: Fix a bug(peeking socket consumes data)
sock.recv takes two parameters instead of one
This commit is contained in:
parent
191ee1a5f9
commit
c2c2993ff7
|
@ -26,7 +26,9 @@ class RelayConnectionHandler:
|
||||||
addr, _ = sock.getpeername()
|
addr, _ = sock.getpeername()
|
||||||
addr = IPv4Address(addr)
|
addr = IPv4Address(addr)
|
||||||
|
|
||||||
control_message = sock.recv(socket.MSG_PEEK)
|
control_message = sock.recv(
|
||||||
|
len(RELAY_CONTROL_MESSAGE_REMOVE_FROM_WAITLIST), socket.MSG_PEEK
|
||||||
|
)
|
||||||
|
|
||||||
if control_message.startswith(RELAY_CONTROL_MESSAGE_REMOVE_FROM_WAITLIST):
|
if control_message.startswith(RELAY_CONTROL_MESSAGE_REMOVE_FROM_WAITLIST):
|
||||||
self._relay_user_handler.disconnect_user(addr)
|
self._relay_user_handler.disconnect_user(addr)
|
||||||
|
|
Loading…
Reference in New Issue