crossbario / crossbario/autobahn-python

ApplicationRunner in undefined state when opening handshake timeout is skipped

Open
#960 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

asyncio bug needs-investigation PRIO HIGH wamp
Dominant language
Python
Stars
2.5k
Forks
768
PR merge metrics
No merged PRs in 30d

Description

For testing purposes, I am trying to find out when a crossbar router is available and accepting connections.

When the router is not yet started the autobahn.asyncio.wamp.ApplicationSession throws a ConnectionRefusedError.
Once the router is ready a session is established as expected.

Now my problem: If the router is starting up while I try to connect I get the following log message from onOpenHandshakeTimeout():
skipping opening handshake timeout: WebSocket connection is already closed

Now the main loop runs apparently forever and nothing happens.
Is there any way for me to detect this situation? Is there a callback I should overwrite? I was not able to find one.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with autobahn.asyncio.wamp.ApplicationSession and the onOpenHandshakeTimeout() path described in the issue, then trace what happens when the WebSocket connection is already closed during router startup. Done means the undefined state is reproducible and the issue's requested detection or callback behavior is clearly handled and verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.