Extended timeout in client side

This commit is contained in:
kale4eat
2024-03-09 00:23:23 +09:00
parent 2994873e38
commit a0b5cd3d1b

View File

@@ -9,8 +9,8 @@ from common.log import logger
class WorkerClient: class WorkerClient:
def __init__(self, port: int) -> None: def __init__(self, port: int) -> None:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# 5: timeout # 60: timeout
sock.settimeout(5) sock.settimeout(60)
sock.connect((socket.gethostname(), port)) sock.connect((socket.gethostname(), port))
self.sock = sock self.sock = sock