From 698446c4c1e61a6049c90ba428c594fe052bf266 Mon Sep 17 00:00:00 2001 From: swee <meow@swee.codes> Date: Wed, 5 Feb 2025 12:47:50 -0800 Subject: [PATCH] Update server.py --- server.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server.py b/server.py index e41e447..1731ab9 100644 --- a/server.py +++ b/server.py @@ -245,6 +245,8 @@ def session(connection, client, ip, isssl=False): ping_pending = False pendingSend = "" # Text that should be sent to the client IRCv3Features = [] # List of Acknowledged IRCv3 features. + connection.setblocking(False) + connection.settimeout(5) def tags(): # Get IRCv3 tags tags = "" if "server-time" in IRCv3Features: @@ -861,7 +863,6 @@ def ssl_session(sock): conn = SSL.Connection(ctx, connection) conn.set_accept_state() conn.do_handshake() - conn.settimeout(5) threading.Thread(target=session, daemon=True, args=[conn, client, ip_to, True]).start() except: print("Something went wrong...")