File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
core/src/main/java/hudson/slaves Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 6666import java .io .InputStream ;
6767import java .io .OutputStream ;
6868import java .io .PrintStream ;
69+ import java .nio .channels .ClosedChannelException ;
6970import java .nio .charset .Charset ;
7071import java .security .Security ;
7172import java .util .ArrayList ;
@@ -641,9 +642,11 @@ public void onClosed(Channel c, IOException cause) {
641642 // Orderly shutdown will have null exception
642643 if (cause != null ) {
643644 offlineCause = new ChannelTermination (cause );
644- Functions . printStackTrace ( cause , taskListener . error ( "Connection terminated" ));
645- } else {
645+ }
646+ if ( cause == null || cause instanceof ClosedChannelException ) {
646647 taskListener .getLogger ().println ("Connection terminated" );
648+ } else {
649+ Functions .printStackTrace (cause , taskListener .error ("Connection terminated" ));
647650 }
648651 closeChannel ();
649652 try {
You can’t perform that action at this time.
0 commit comments