Permalink
Browse files

paper over race when starting hh server

Summary:
Fixes `hh_client` when no server running.

Race still exists - still reproducible with `hh_client stop; hh_server -d $(pwd); hh_client`

t25118779 for real fix

Reviewed By: dabek

Differential Revision: D6708429

fbshipit-source-id: ceb706fcbda7fbea5fc85b573a45fb3c32383dc1
  • Loading branch information...
fredemmott authored and hhvm-bot committed Jan 12, 2018
1 parent 3af6180 commit cbe40ed34fa1ecc53d0ed29e58b755cd213d236f
Showing with 5 additions and 0 deletions.
  1. +5 −0 hphp/hack/src/client/clientConnect.ml
@@ -246,6 +246,11 @@ let rec connect ?(first_attempt=false) env retries start_time tail_env =
debug_port = None;
ignore_hh_version = env.ignore_hh_version;
};
(* work around race condition: hh_client sometimes hangs if it's
* starting the server, especially on mac. Given the server takes
* a while to start and we're waiting for it anyway, this doesn't
* really hurt *)
Unix.sleep 1;
connect env retries start_time tail_env
end else begin
Printf.eprintf begin

0 comments on commit cbe40ed

Please sign in to comment.