From 735456776422c4fa2208bae3c1c7a9efa2814c1c Mon Sep 17 00:00:00 2001 From: Nova Cat Date: Sun, 8 Dec 2024 17:27:10 -0800 Subject: [PATCH] Reuse address if taken --- server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.py b/server.py index 8ad746a..f60288d 100644 --- a/server.py +++ b/server.py @@ -5,7 +5,7 @@ print("Welcome! /ᐠ ˵> ⩊ <˵マ") import socket, time, threading, traceback from requests import get ip = get('https://api.ipify.org').content.decode('utf8') -tcp_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +tcp_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.SO_REUSEADDR) server = "127.0.0.1" displayname = "SWEE.codes" server_address = ('0.0.0.0', 6667)