Skip to content

Commit

Permalink
Merge pull request #169 from gschueler/fix-input-thread-linger
Browse files Browse the repository at this point in the history
Fix zombie Input Reader thread when user changes password
  • Loading branch information
Vincent Partington committed Mar 14, 2016
2 parents ad4b8df + bcb1565 commit d633d8d
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,13 @@ public synchronized int waitFor() {
try {
outputReaderThread.join();
} finally {
winRmClient.deleteShell();
closeQuietly(callersStdin);
processTerminated = true;
try {
winRmClient.deleteShell();
}catch (Throwable t){
logger.warn("Failure while deleting winrm shell", t);
}
}
if (outputReaderThreadException[0] != null) {
if (outputReaderThreadException[0] instanceof RuntimeException) {
Expand All @@ -224,10 +228,10 @@ public synchronized void destroy() {
return;
}

winRmClient.signal();
winRmClient.deleteShell();
closeQuietly(callersStdin);
processTerminated = true;
winRmClient.signal();
winRmClient.deleteShell();
}

@Override
Expand Down

0 comments on commit d633d8d

Please sign in to comment.