Skip to content
Permalink
Browse files

[JENKINS-19465] - Restrore formatting

  • Loading branch information
oleg-nenashev committed Dec 12, 2017
1 parent c13a14a commit 2244572cd1bca25d72f8b04268f3051b78592b3a
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/main/java/hudson/plugins/sshslaves/SSHLauncher.java
@@ -1374,13 +1374,13 @@ public void afterDisconnect(SlaveComputer slaveComputer, final TaskListener list
private synchronized void tearDownConnection(@Nonnull SlaveComputer slaveComputer, final @Nonnull TaskListener listener) {
if (connection != null) {
boolean connectionLost = reportTransportLoss(connection, listener);
if (session != null) {
if (session!=null) {
// give the process 3 seconds to write out its dying message before we cut the loss
// and give up on this process. if the slave process had JVM crash, OOME, or any other
// critical problem, this will allow us to capture that.
// exit code is also an useful info to figure out why the process has died.
try {
listener.getLogger().println(getSessionOutcomeMessage(session, connectionLost));
listener.getLogger().println(getSessionOutcomeMessage(session,connectionLost));
session.getStdout().close();
session.close();
} catch (Throwable t) {
@@ -1423,7 +1423,7 @@ public void run() {
}
});
try {
// the delete is best effort only and if it takes longer than 60 seconds - or the launch
// the delete is best effort only and if it takes longer than 60 seconds - or the launch
// timeout (if specified) - then we should just give up and leave the file there.
tidyUp.get(launchTimeoutSeconds == null ? 60 : launchTimeoutSeconds, TimeUnit.SECONDS);
} catch (InterruptedException e) {

0 comments on commit 2244572

Please sign in to comment.