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.
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 aConnectionRefusedError
. 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.