You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import asyncio
import aiohttp
async def main():
async with aiohttp.ClientSession() as session:
async with session.ws_connect('http://example.org/ws') as ws:
await ws.close()
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
immediatelly returns
Traceback (most recent call last):
File "1.py", line 12, in <module>
loop.run_until_complete(main())
File "/usr/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete
return future.result()
File "1.py", line 8, in main
async with session.ws_connect('http://example.org/ws') as ws:
File "/home/andrew/projects/aiohttp/aiohttp/client.py", line 840, in __aenter__
self._resp = await self._coro
File "/home/andrew/projects/aiohttp/aiohttp/client.py", line 606, in _ws_connect
headers=resp.headers)
aiohttp.client_exceptions.WSServerHandshakeError: 404, message='Invalid response status'
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs.
If you feel like there's important points made in this discussion, please include those exceprts into that [new issue].
[new issue]: https://github.com/aio-libs/aiohttp/issues/new
Long story short
ws_connect hang when server port not open, i try to add timeout param, but always hang.
Expected behaviour
Actual behaviour
Steps to reproduce
Your environment
ubuntu-desktop 18.04, python3.6.5 aiohttp 3.2.1
The text was updated successfully, but these errors were encountered: