lost server part 4 - hhconfig
Summary:
Maybe the server terminated itself after seeing that .hhconfig has changed, or maybe the monitor terminated itself some time after the .hhconfig change when someone happened to invoke an "hh" command using the new version of hh_client (causing the existing running monitor to terminate itself with a Mismatch error).
Whatever the cause for the server shutting down, this diff causes "hh_client lsp" to recognize that .hhconfig has changed and therefore it too must terminate itself. That will prompt VSCode/Nuclide to relaunch hh_client. Hopefully the technique for launching hh_client will now launch a new version of it (based on the contents of .hhconfig). Then the new version will communicate with the server, telling it (if necessary) to restart itself due to version mismatch.
If we didn't terminate "hh_client lsp", then we'd be in a situation where the old version of hh_client might be trying to establish a persistent connection with the server. Meanwhile, any time the user invokes "hh" at the command-line, they'd end up getting a new version.
Reviewed By: alexchow
Differential Revision:
D5620640
fbshipit-source-id:
477ba0538b99a9b22397c8db869aa33890668de3