Print client disconnection. Summary: Print error message on client disconnection. In the normal case this will never be seen as the client has disconnected, but this change should help detect suspected false disconnections. Test Plan: buck test --all
diff --git a/src/com/facebook/buck/cli/Main.java b/src/com/facebook/buck/cli/Main.java index f39b8ad..c21b0eb 100644 --- a/src/com/facebook/buck/cli/Main.java +++ b/src/com/facebook/buck/cli/Main.java
@@ -174,7 +174,7 @@ return parser; } - private void watchClient(NGContext context) { + private void watchClient(final NGContext context) { context.addClientListener(new NGClientListener() { @Override public void clientDisconnected() { @@ -185,6 +185,8 @@ // so needs to be left in a consistent state even if the current command is interrupted // due to a client disconnection. synchronized (parser) { + // Client should no longer be connected, but printing helps detect false disconnections. + context.err.println("Client disconnected."); System.exit(CLIENT_DISCONNECT_EXIT_CODE); } }