-
Notifications
You must be signed in to change notification settings - Fork 108
reconnect when handshake failed. #233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| } | ||
| } | ||
|
|
||
| private static TimeSpan GetRetryDelay(ref int retryCount) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment explaining that this is exponential back off up to 5.
|
When would this happen? |
|
Handshake failed. |
|
Sure, when does that happen? |
|
BTW I think this change is good I just want to understand the reasoning. Is it pre-emptive or did we see issues here? |
|
@davidfowl The issue #222 (comment) here, the server connections dropped, and never came back until a new deployment. So we are thinking it might be more robust for the server side to always try connecting |
|
This is specifically this case right:
When does this happen? |
|
And we want to return more error in handshake, e.g. reach rate limit for free tiers, and when customer upgrade it should be recover. |
|
And I think this case: azure-signalr/src/Microsoft.Azure.SignalR.Common/ServiceConnectionBase.cs Lines 167 to 174 in dcaffb4
should also return false, instead of reconnecting with a short delay. For example, if my access key is wrong, SDK will try to connect service, and always get an exception, web socket never connected, and retry in a high rate. |
I agree with most of what you're saying. I'd like to see some tests for these cases. |
When app server failed to handshake with service, it will stop connect.
But the app server will running to a strange state:
Solutions:
Big impact when service has some temporary issue.