From 5c7945aaeec82f656f6e5618888f4e1b9066ff29 Mon Sep 17 00:00:00 2001 From: Tomasz Strejczek Date: Sun, 20 Oct 2019 14:07:37 +0200 Subject: [PATCH] Fixes #9995 Signed-off-by: Tomasz Strejczek --- .../com/google/devtools/build/lib/server/GrpcServerImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/google/devtools/build/lib/server/GrpcServerImpl.java b/src/main/java/com/google/devtools/build/lib/server/GrpcServerImpl.java index 494fcafd7548fb..df34ffc06d339f 100644 --- a/src/main/java/com/google/devtools/build/lib/server/GrpcServerImpl.java +++ b/src/main/java/com/google/devtools/build/lib/server/GrpcServerImpl.java @@ -477,6 +477,9 @@ private void writeServerStatusFiles(InetSocketAddress address) throws IOExceptio info.writeTo(out); } Path serverInfoFile = serverDirectory.getChild(SERVER_INFO_FILE); + if (serverInfoFile.exists()) { + serverInfoFile.delete(); + } serverInfoTmpFile.renameTo(serverInfoFile); deleteAtExit(serverInfoFile); }