very temporary socket tracking dbg

This commit is contained in:
ed
2019-06-25 21:24:52 +00:00
parent 9fcd4823b5
commit 9ef3945abf
5 changed files with 11 additions and 3 deletions

View File

@@ -37,6 +37,7 @@ class HttpSrv(object):
def accept(self, sck, addr):
"""takes an incoming tcp connection and creates a thread to handle it"""
self.log(str(addr), "-" * 5 + "C-cthr")
thr = threading.Thread(target=self.thr_client, args=(sck, addr, self.log))
thr.daemon = True
thr.start()
@@ -62,9 +63,11 @@ class HttpSrv(object):
thr.start()
try:
self.log(str(addr), "-" * 6 + "C-crun")
cli.run()
finally:
self.log(str(addr), "-" * 7 + "C-done")
sck.close()
with self.mutex:
del self.clients[cli]