From 970fb84fd86b847472bced7d994bd11f1a413187 Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 9 Jul 2021 16:11:33 +0200 Subject: [PATCH] hex looks better --- copyparty/httpsrv.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/copyparty/httpsrv.py b/copyparty/httpsrv.py index 69634852..97b51bc6 100644 --- a/copyparty/httpsrv.py +++ b/copyparty/httpsrv.py @@ -48,7 +48,7 @@ class HttpSrv(object): self.log = broker.log self.asrv = broker.asrv - self.name = "httpsrv-i" + str(os.getpid()) + self.name = "httpsrv-i{:x}".format(os.getpid()) self.mutex = threading.Lock() self.stopping = False @@ -138,6 +138,7 @@ class HttpSrv(object): sck, addr = srv_sck.accept() except (OSError, socket.error) as ex: self.log(self.name, "accept({}): {}".format(fno, ex), c=6) + time.sleep(0.02) continue if self.args.log_conn: