mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
small socket improvement
This commit is contained in:
parent
143d39316e
commit
38df869fe1
1 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,7 @@ class CMDTCPRequestHandler(socketserver.BaseRequestHandler):
|
|||
while True and socketTimeout > time.time():
|
||||
chunk = self.request.recv(1024) # .strip()
|
||||
data += chunk
|
||||
if chunk.endswith(b'\n'):
|
||||
if chunk.endswith(b'}\n') or chunk.endswith(b'}') or chunk.endswith(b'\n'):
|
||||
break
|
||||
data = data[:-1] # remove b'\n'
|
||||
data = str(data, 'utf-8')
|
||||
|
|
Loading…
Reference in a new issue