Skip to content

Commit 7ce4308

Browse files
gabelevifacebook-github-bot
authored andcommitted
[Easy] Don't say we're ready until after garbage collecting
Summary: We used to send the "Ready" event immediately before garbage collecting. That's kind of dumb. We should say we're ready after garbage collecting, when we're actually ready to handle a request. This is a bigger deal when I move file watching to the monitor process, since a ready server will just stop and wait for a message from the monitor. Reviewed By: samwgoldman Differential Revision: D7336759 fbshipit-source-id: 1edaf89bcc8aa6a317ad9cc7e1cf9e6b2e0129b7
1 parent 383a2df commit 7ce4308

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/server/server.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,10 @@ let process_message genv env request =
171171
{ env with connections = Persistent_connection.remove_client env.connections client_id }
172172

173173
let rec serve ~dfind ~genv ~env =
174+
ServerPeriodical.call_before_sleeping ();
175+
174176
MonitorRPC.status_update ~event:ServerStatus.Ready;
175177

176-
ServerPeriodical.call_before_sleeping ();
177178
let%lwt message = get_next_message () in
178179

179180
let%lwt env = recheck_loop ~dfind genv env in

0 commit comments

Comments
 (0)