Retry Wamp connection when it fails #577
Replies: 7 comments
-
please have a look at "automatic reconnection": https://github.com/crossbario/autobahn-js/blob/master/doc/reference.md#connection-options |
Beta Was this translation helpful? Give feedback.
-
@oberstet, I've already have the -1 set to The error I'm facing is the one from the image below:
|
Beta Was this translation helpful? Give feedback.
-
Well, it seems to indicate an authentication problem - which seems unrelated to auto-reconnect. AutobahnJS will fully reauthenticate for every reconnect. A connection is "reconnected" by creating a fresh connection .. however, there is no language to differentiate between "reconnecting == automatically establish a new connection" and "reconnecting = recover a closed connection by reopening that connection" - the latter doesn't exist, the former is what is meant with "reconnecting" |
Beta Was this translation helpful? Give feedback.
-
@oberstet But what would you suggest for a case where I need to recover from a closed connection by creating a new connection ? |
Beta Was this translation helpful? Give feedback.
-
no, actually, what you can see from the log is: the client indeed reconnects, but the authentication fails. if the first connect succeeds, but follow ups fail, it could be a client side (your code) bug ... are you recomputing a new signature for the follow up connections (WAMP-CRA has replay protection) |
Beta Was this translation helpful? Give feedback.
-
you can also try to use WAMP-Anon -- run without WAMP-CRA authentication and assure yourself that in this case the automatic reconnect works (eg when you reboot your router). bisect the problem. |
Beta Was this translation helpful? Give feedback.
-
@oberstet Thank you. We'll handle it with client retry. |
Beta Was this translation helpful? Give feedback.
-
Hi @oberstet, how are you sir ?
I've been checking out the
autobahn-js
repo and seeking a way to retry the Wamp connection in case it fails. But after doing that and reading Crossbar's doc, I didn't see any part where that could be achieved.I want to be able to change both
retry_count
andwill_retry
values. But not sure if that'll help.Would you know if there's a way to do that ?
Best regards,
Beta Was this translation helpful? Give feedback.
All reactions