don't flicker 'Restart' if it'll be brief
commite26ff2a5e0fc89688857313f284a54b7b15b5e44
authorLucian Wischik <ljw@fb.com>
Fri, 8 Sep 2017 20:25:06 +0000 (8 13:25 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Fri, 8 Sep 2017 20:32:17 +0000 (8 13:32 -0700)
treeecb37d91b3b062db2796605a8e1a36738a70d3ce
parent2c26462162435ad289d178ab030fb1b0dd63b1d1
don't flicker 'Restart' if it'll be brief

Summary:
Imagine you tweak .hhconfig to cause an server restart, or you do 'hh restart'.

Previously it would flicker up "hh_server is stopped [restart]" for a moment as it entered the Lost_server state, and then on the next tick it would see that the lockfile is present and so reconnect.

This diff eliminates the flicker. If it loses the server but sees the lockfile is present, then it will avoid putting up the dialog, and will instead go straight to reconnection.

Reviewed By: alexchow

Differential Revision: D5640025

fbshipit-source-id: 5b2bde481f29bf01a937c6dfb728106c2767c7c8
hphp/hack/src/client/clientLsp.ml