Skip to content

Commit

Permalink
Merge branch 'master' into chore_bump_pytest_cov_5_0
Browse files Browse the repository at this point in the history
  • Loading branch information
leszekhanusz authored Jul 14, 2024
2 parents 429e712 + 9f93215 commit 9aef01b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion gql/transport/websockets_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,11 @@ async def connect(self) -> None:
await self._initialize()
except ConnectionClosed as e:
raise e
except (TransportProtocolError, asyncio.TimeoutError) as e:
except (
TransportProtocolError,
TransportServerError,
asyncio.TimeoutError,
) as e:
await self._fail(e, clean_close=False)
raise e

Expand Down
3 changes: 3 additions & 0 deletions tests/test_websocket_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,9 @@ async def test_websocket_connect_failed_with_authentication_in_connection_init(

await session.execute(query1)

await asyncio.sleep(1)
assert transport.websocket is None


@pytest.mark.parametrize("server", [server1_answers], indirect=True)
def test_websocket_execute_sync(server):
Expand Down

0 comments on commit 9aef01b

Please sign in to comment.