Update server.py

This commit is contained in:
Namhyeon Go 2024-11-18 21:05:07 +09:00 committed by GitHub
parent 85f2b19b46
commit 3ffc8ca29c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -346,7 +346,7 @@ def proxy_server(
# send following chunks # send following chunks
buffered = b"" buffered = b""
conn.settimeout(1) conn.settimeout(connection_timeout)
while True: while True:
try: try:
chunk = conn.recv(buffer_size) chunk = conn.recv(buffer_size)
@ -669,7 +669,7 @@ def start(): # Main Program
if not data: if not data:
data = b'' data = b''
except socket.timeout: except socket.timeout:
logger.warning(f"No data received from {addr}. Attempting to request data.") logger.warning(f"No data received from " + ("%s:%s" % addr) + ". Attempting to request data.")
data = b'' data = b''
return data return data