diff --git a/core/src/main/java/hudson/util/StreamCopyThread.java b/core/src/main/java/hudson/util/StreamCopyThread.java index 8df8c4171ee6..d456134d44bc 100644 --- a/core/src/main/java/hudson/util/StreamCopyThread.java +++ b/core/src/main/java/hudson/util/StreamCopyThread.java @@ -64,8 +64,10 @@ public void run() { // so there's no 'closeIn' flag. in.close(); if (closeOut) { + // This mode is not currently used in core. out.close(); } else { + // Leaving the stream open, but we want to make sure any final output is sent to the master. out.flush(); } }