Skip to content

Commit 8e595a7

Browse files
author
Ajay Kannan
committed
avoid duplicating last log on terminate
1 parent 4e7aa3a commit 8e595a7

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/testing/LocalGcdHelper.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,6 @@ private static class ProcessErrorStreamReader extends Thread {
239239

240240
void terminate() throws IOException {
241241
terminated = true;
242-
writeLog(currentLogLevel, currentLog);
243242
errorReader.close();
244243
}
245244

@@ -253,14 +252,14 @@ public void run() {
253252
nextLine = errorReader.readLine();
254253
if (nextLine == null) {
255254
terminated = true;
256-
writeLog(currentLogLevel, currentLog);
257255
} else {
258256
processLogLine(previousLine, nextLine);
259257
}
260258
} catch (IOException e) {
261259
// ignore
262260
}
263261
}
262+
writeLog(currentLogLevel, currentLog);
264263
}
265264

266265
private void processLogLine(String previousLine, String nextLine) {

0 commit comments

Comments
 (0)