From 2c8cf4bbd7a3a90312c513e22861242fcb3e339a Mon Sep 17 00:00:00 2001 From: ed Date: Sat, 7 Mar 2026 21:47:24 +0000 Subject: [PATCH] Update httpsrv.py --- copyparty/httpsrv.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/copyparty/httpsrv.py b/copyparty/httpsrv.py index 728a3743..a830f5c5 100644 --- a/copyparty/httpsrv.py +++ b/copyparty/httpsrv.py @@ -119,7 +119,6 @@ class HttpSrv(object): socket.setdefaulttimeout(120) self.t0 = time.time() - self.bad_ver = False nsuf = "-n{}-i{:x}".format(nid, os.getpid()) if nid else "" self.magician = Magician() self.nm = NetMap([], []) @@ -144,6 +143,7 @@ class HttpSrv(object): self.name = "hsrv" + nsuf self.mutex = threading.Lock() self.u2mutex = threading.Lock() + self.bad_ver = False self.stopping = False self.tp_nthr = 0 # actual @@ -233,9 +233,6 @@ class HttpSrv(object): self.th_cfg: dict[str, set[str]] = {} Daemon(self.post_init, "hsrv-init2") - def set_bad_ver(self, val: bool) -> None: - self.bad_ver = val - def post_init(self) -> None: try: x = self.broker.ask("thumbsrv.getcfg") @@ -243,6 +240,9 @@ class HttpSrv(object): except: pass + def set_bad_ver(self) -> None: + self.bad_ver = True + def set_netdevs(self, netdevs: dict[str, Netdev]) -> None: ips = set() for ip, _ in self.bound: