forked from shaba/openuds
added timeout to oppened tunnel to avoid possible DOS
This commit is contained in:
parent
a9c32debd2
commit
1ff0a623db
@ -222,6 +222,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.debug('ACCEPTED CONNECTION from %s (%s)', addr, client)
|
logger.debug('ACCEPTED CONNECTION from %s (%s)', addr, client)
|
||||||
# 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…
x
Reference in New Issue
Block a user