mirror of
https://github.com/dkmstr/openuds.git
synced 2025-03-20 06:50:23 +03:00
backport udstunnel fix
This commit is contained in:
parent
645f61c8e6
commit
dcedb268dd
@ -201,11 +201,11 @@ def process_connection(
|
||||
data = client.recv(len(consts.HANDSHAKE_V1))
|
||||
|
||||
if data != consts.HANDSHAKE_V1:
|
||||
raise Exception() # Invalid handshake
|
||||
raise Exception('Invalid data: {} ({})'.format( addr, data.hex())) # Invalid handshake
|
||||
conn.send((client, addr))
|
||||
del client # Ensure socket is controlled on child process
|
||||
except Exception:
|
||||
logger.error('HANDSHAKE invalid from %s (%s)', addr, data.hex())
|
||||
except Exception as e:
|
||||
logger.error('HANDSHAKE invalid (%s)', e)
|
||||
# Close Source and continue
|
||||
client.close()
|
||||
|
||||
@ -270,7 +270,7 @@ def tunnel_main(args: 'argparse.Namespace') -> None:
|
||||
|
||||
prcs = processes.Processes(tunnel_proc_async, cfg, stats_collector.ns)
|
||||
|
||||
with ThreadPoolExecutor(max_workers=256) as executor:
|
||||
with ThreadPoolExecutor(max_workers=16) as executor:
|
||||
try:
|
||||
while not do_stop.is_set():
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user