-
Notifications
You must be signed in to change notification settings - Fork 707
fix WinRM thread leak #1987
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix WinRM thread leak #1987
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -86,8 +86,19 @@ | |
| return; | ||
| } | ||
|
|
||
| client.signal(); | ||
| client.deleteShell(); | ||
| // Instance may already be terminated, causing WinRM operations to fail | ||
| try { | ||
| client.signal(); | ||
| } catch (Exception e) { | ||
| LOGGER.log(Level.FINE, () -> "Failed to signal WinRM shell: " + e.getMessage()); | ||
| } | ||
|
|
||
| try { | ||
| client.deleteShell(); | ||
| } catch (Exception e) { | ||
| LOGGER.log(Level.FINE, () -> "Failed to delete WinRM shell: " + e.getMessage()); | ||
|
Comment on lines
+93
to
+99
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From what I can tell, it’s possible to call I’ll look into whether there’s a straightforward way to detect this status so we can adjust the log level accordingly.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
A comment to that effect would suffice I think. |
||
| } | ||
|
|
||
| terminated = true; | ||
| Closeables.closeQuietly(toCallersStdout); | ||
| Closeables.closeQuietly(toCallersStdin); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mkdirProcessandinitProcesserrors did not appear in the logs, but for completeness, I am also proposing to handle them.