From 01470b123bb067e12f004ac6a51d5af8d5261e11 Mon Sep 17 00:00:00 2001 From: HIM049 Date: Thu, 16 Feb 2023 01:02:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=20FakeServer=20?= =?UTF-8?q?=E5=90=AF=E5=8A=A8=E5=90=8E=E4=B8=80=E6=AE=B5=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E4=BC=9A=E8=87=AA=E5=8A=A8=E5=85=B3=E9=97=AD=E7=9A=84=E9=94=99?= =?UTF-8?q?=E8=AF=AF=20(timeout)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hibernate_r/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hibernate_r/__init__.py b/hibernate_r/__init__.py index 9669e1c..03d25b1 100644 --- a/hibernate_r/__init__.py +++ b/hibernate_r/__init__.py @@ -81,7 +81,6 @@ def fake_server(server: PluginServerInterface): server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, True) server_socket.bind((fs_ip, fs_port)) - server_socket.settimeout(5000) except: server.logger.error("伪装服务端启动失败") server_socket.close() @@ -157,7 +156,8 @@ def fake_server(server: PluginServerInterface): server.logger.warning("[%s:%s]收到了无效数据(%s)" % (client_ip, client_address[1], recv_data)) except Exception as e: server.logger.error(e) - except: + except Exception as ee: + server.logger.error("发生错误%s" % ee) server.logger.info("关闭套接字") server_socket.close()