Commit 3e5381ee authored by Seth Sims's avatar Seth Sims
Browse files

aiohttp 3 dropped the tp alias for type in WSMessage, changing to its full name

parent 1b6991e2
......@@ -26,16 +26,16 @@ class AiohttpTransport(transport.AbstractBaseTransport):
async def read(self):
data = await self._ws.receive()
if == aiohttp.WSMsgType.close:
if data.type == aiohttp.WSMsgType.close:
await self._transport.close()
raise RuntimeError("Connection closed by server")
elif == aiohttp.WSMsgType.error:
elif data.type == aiohttp.WSMsgType.error:
# This won't raise properly, fix
elif == aiohttp.WSMsgType.closed:
elif data.type == aiohttp.WSMsgType.closed:
# Hmm
raise RuntimeError("Connection closed by server")
elif == aiohttp.WSMsgType.text:
elif data.type == aiohttp.WSMsgType.text:
# Should return bytes
data ='utf-8')
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment