diff options
Diffstat (limited to 'socketserver.py')
-rwxr-xr-x | socketserver.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/socketserver.py b/socketserver.py index 471b8be..0a7e9d4 100755 --- a/socketserver.py +++ b/socketserver.py @@ -104,12 +104,12 @@ class Handler(object): def _read(self:object, conn:socket, mask:int):
""" Internal method used to retreive data from the socket
"""
- data = conn.recv(1024).strip()
+ data = conn.recv(1024)
if data == bytes("", "ascii"):
# A socket ready but sending garbage is a dead socket.
self.close(conn)
return
- json_data = str(data, "utf-8")
+ json_data = str(data.strip(), "utf-8")
try:
js = json.loads(json_data)
for key in js.keys():
|