Re-use wait_for_server_hello to display spinners when waiting for rpc result
commitd192db9a60bf94aba9db93fe4a3733c4f696d310
authorKasper Kopec <kasper@fb.com>
Mon, 12 Mar 2018 19:33:52 +0000 (12 12:33 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Mon, 12 Mar 2018 19:50:24 +0000 (12 12:50 -0700)
tree82817af080c6fad80d00e75fdc26220f09f74237
parent6654b7d8d6d8b4828e810ae8548f201c1f341008
Re-use wait_for_server_hello to display spinners when waiting for rpc result

Summary:
It used to be that when `ClientConnect.connect` returns, the server is ready, waiting for the client to send the message, and the moment it reads it it will start processing it. There are no spinners during this period (presumably, because it's supposed to happen fast).

This is already not working sometimes due to lazy (delayed) rechecking, which could insert an lengthy recheck between reading the command and executing it - see the test plan.

When we add interruptible typechecking, it will become even more likely - it's possible that we'll read the client message, and (since it requires full recheck), delay it to serve some other, quicker commands in the meantime.

I'm fixing it by re-using the spinner code from connect method in the rpc method too.

Reviewed By: gregory-nisbet

Differential Revision: D7178015

fbshipit-source-id: f101e1f469e84e89e3d7c13081c9a18cee732eb3
hphp/hack/src/client/clientConnect.ml