Server connection does not block on client connection lifetime #1332
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To solve the issue described here #1318, to be consistent with self-host SignalR, our SDK should not timeout on long-run client hub logic.
Why we have this timeout is because the client connection lifetime impacts the auto-reconnect of the server connection. When a server connection drops, it first cleans up all the existing client connections, waiting for the client connections to complete their lifetime, and then restart another server connection. If there is some malformed code inside one client hub, it can impact the whole stability of the server connection if there is no timeout.
Server connection, can be considered as the transport layer to carry traffics for some mapped client connections. Server connection drops, similar to network issues, should not terminate the client hub application logic. If the client hub logic depends on the transport layer, the client hub logic can determine if it throws or continue. Considering this, we change the server-connection cleanup logic to not blocked by client lifetime.