Skip to content

Handle disconnects #363

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

Merged
merged 14 commits into from
Mar 28, 2019
Merged

Handle disconnects #363

merged 14 commits into from
Mar 28, 2019

Conversation

code-asher
Copy link
Member

@code-asher code-asher commented Mar 27, 2019

We already reconnect the web socket when it drops but we also need to restart/reconnect services that started before the disconnection.

This PR will do that for the following:

  • Terminal instances (just spawn a new instance for now)
  • Extension host (already supported, just make it automatic)
  • Watcher (already supported, but need to use our retry for it)
  • Searcher
  • spdlog instances

Won't be in this PR:

  • Shared process

Other:

  • Show message when the shared process dies explaining what won't work while it's dead and to restart/refresh the page for now if you need any of that.

@code-asher code-asher added the wip label Mar 27, 2019
@code-asher code-asher requested a review from kylecarbs as a code owner March 27, 2019 21:33
Reduces duplicate code. Not all items are "supposed" to have an error
event according to the original implementation we are filling, but there
is no reason why we can't emit our own events (and are already doing so
for the "disconnected" event anyway).
@code-asher code-asher removed the wip label Mar 28, 2019
It doesn't tell you anything that trace logging wouldn't and has
no relation to what the function actually does.
@kylecarbs kylecarbs merged commit 03ad2a1 into master Mar 28, 2019
@kylecarbs kylecarbs deleted the feature/reconnect branch March 28, 2019 22:59
code-asher added a commit that referenced this pull request Jun 19, 2019
* Make proxies decide how to handle disconnects

* Connect to a new terminal instance on disconnect

* Use our retry for the watcher

* Specify method when proxy doesn't exist

* Don't error when closing/killing disconnected proxy

* Specify proxy ID when a method doesn't exist

* Use our retry for the searcher

Also dispose some things for the watcher because it doesn't seem that
was done properly.

The searcher also now starts immediately so there won't be lag when you
perform your first search.

* Use our retry for the extension host

* Emit error in parent proxy class

Reduces duplicate code. Not all items are "supposed" to have an error
event according to the original implementation we are filling, but there
is no reason why we can't emit our own events (and are already doing so
for the "disconnected" event anyway).

* Reconnect spdlog

* Add error message when shared process disconnects

* Pass method resolve to parse

* Don't pass method to getProxy

It doesn't tell you anything that trace logging wouldn't and has
no relation to what the function actually does.

* Fix infinite recursion when disposing protocol client in tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants