Browse Source

socket.recv -> socket.recv_string

pull/1/head
amper43 6 years ago
parent
commit
6b9a4a03cc
  1. 3
      analytics/analytics/services/server_service.py

3
analytics/analytics/services/server_service.py

@ -58,8 +58,7 @@ class ServerService:
async def __anext__(self) -> ServerMessage: async def __anext__(self) -> ServerMessage:
while True: while True:
received_bytes = await self.socket.recv() text = await self.socket.recv_string()
text = received_bytes.decode('utf-8')
if text == 'PING': if text == 'PING':
asyncio.ensure_future(self.__handle_ping()) asyncio.ensure_future(self.__handle_ping())

Loading…
Cancel
Save