forked from shaba/openuds
Restored timeout
This commit is contained in:
parent
ccb2dfbdbe
commit
bec985e360
@ -113,7 +113,6 @@ async def tunnel_proc_async(
|
|||||||
# Connection done, check for handshake
|
# Connection done, check for handshake
|
||||||
source: socket.socket
|
source: socket.socket
|
||||||
source, address = msg
|
source, address = msg
|
||||||
source.settimeout(3.0) # So we don't block forever
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# First, ensure handshake (simple handshake) and command
|
# First, ensure handshake (simple handshake) and command
|
||||||
@ -224,6 +223,7 @@ def tunnel_main():
|
|||||||
while not do_stop:
|
while not do_stop:
|
||||||
try:
|
try:
|
||||||
client, addr = sock.accept()
|
client, addr = sock.accept()
|
||||||
|
client.settimeout(3.0)
|
||||||
logger.info('CONNECTION from %s', addr)
|
logger.info('CONNECTION from %s', addr)
|
||||||
# Select BEST process for sending this new connection
|
# Select BEST process for sending this new connection
|
||||||
prcs.best_child().send((client, addr))
|
prcs.best_child().send((client, addr))
|
||||||
|
Loading…
Reference in New Issue
Block a user