Add a client API method to allow the server to ping a client to see if it's still responsive #4355
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 fix Dart-Code/Dart-Code#3966 (which I think is also related to Dart-Code/Dart-Code#3964), we need the server to be able to ping a client to see whether it's still alive.
We previously used the clients SSE connection back to the server to know this, but since it has a 30 second timeout (to allow for reconnects if proxy drops it), we may end up assuming a client is still alive when the browser has been closed by the user.
This adds a
pingmethod the server can call that just triggers a response that the server can use to verify a client is really active before doing something where it's critical we know for sure the client is still active.There's server work to go with this, but it's in the SDK. We can't land that work until this method is available (and rolled into the SDK).