Update httpsrv.py

This commit is contained in:
ed 2026-03-07 21:47:24 +00:00 committed by GitHub
parent 354275ab7b
commit 2c8cf4bbd7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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: