diff --git a/aiogremlin/driver/aiohttp/transport.py b/aiogremlin/driver/aiohttp/transport.py index 01e80d701502ab1c74b19c01e0277bf3ea774f59..3fe33ed1bdca38772b29cb9f1cea7af2dbed2126 100644 --- a/aiogremlin/driver/aiohttp/transport.py +++ b/aiogremlin/driver/aiohttp/transport.py @@ -26,16 +26,16 @@ class AiohttpTransport(transport.AbstractBaseTransport): async def read(self): data = await self._ws.receive() - if data.tp == aiohttp.WSMsgType.close: + if data.type == aiohttp.WSMsgType.close: await self._transport.close() raise RuntimeError("Connection closed by server") - elif data.tp == aiohttp.WSMsgType.error: + elif data.type == aiohttp.WSMsgType.error: # This won't raise properly, fix raise data.data - elif data.tp == aiohttp.WSMsgType.closed: + elif data.type == aiohttp.WSMsgType.closed: # Hmm raise RuntimeError("Connection closed by server") - elif data.tp == aiohttp.WSMsgType.text: + elif data.type == aiohttp.WSMsgType.text: # Should return bytes data = data.data.strip().encode('utf-8') else: