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
Dialer socket is configured with NNG_OPT_RECONNMINT=100, NNG_OPT_RECONNMAXT=0
Either member of the pair may start first
Expected Behavior
If the dialer is started first, it should automatically attempt to connect asynchronously to the listener every 100ms until the listener is started
Actual Behavior
If the dialer is started first, it takes between a few seconds up to nearly a minute (seems random) to connect to the listener after the listener is started. The shorter the amount of time between the dialer and listener starting, the shorter the time to connect. At a guess it's like it's doing the exponential backoff, despite the NNG_OPT_RECONNMAXT being set to 0.
If the listener is started first, the dialer connects instantly.
The text was updated successfully, but these errors were encountered:
sjpritchard
changed the title
Dialer connecting asynchronously does not connect immediately if listener is started after dialer
Asynchronous dialer does not connect immediately if listener is started after dialer
Apr 2, 2020
Update: setting NNG_OPT_RECONNMAXT to the same as NNG_OPT_RECONNMINT resolves the problem. However, the documentation for NNG_OPT_RECONNMAXT states:
If this value is zero, then no exponential back-off between connection attempts is done, and each attempt will wait the time specified by NNG_OPT_RECONNMINT.
gdamore
changed the title
Asynchronous dialer does not connect immediately if listener is started after dialer
NNG_OPT_RECONNMAXT zero does not prevent exponential back-off
May 24, 2020
Firstly, thankyou for such an awesome library :)
NNG & Platform details.
Expected Behavior
If the dialer is started first, it should automatically attempt to connect asynchronously to the listener every 100ms until the listener is started
Actual Behavior
If the dialer is started first, it takes between a few seconds up to nearly a minute (seems random) to connect to the listener after the listener is started. The shorter the amount of time between the dialer and listener starting, the shorter the time to connect. At a guess it's like it's doing the exponential backoff, despite the NNG_OPT_RECONNMAXT being set to 0.
If the listener is started first, the dialer connects instantly.
Steps to Reproduce
Dialer
Listener
The text was updated successfully, but these errors were encountered: