commit 231293ab8be7fefb57d9a1fc15d2411f1f3baafa
parent 9c7b1193040806961d0230404928ebb095417715
Author: rbckman <rob@tarina.org>
Date: Tue, 10 Jan 2023 15:28:16 +0000
ye naa
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tarina.py b/tarina.py
@@ -1185,13 +1185,15 @@ def listenforclients(host, port, q):
s.bind((host,port))
#s.settimeout(0)
print("listening on port "+str(port))
- s.listen(5)
- c, addr = s.accept()
while True:
try:
+ s.listen(5)
+ c, addr = s.accept()
data = c.recv(1024).decode()
if not data:
print("no data")
+ c.close()
+ q.put('')
break
else:
if addr: