You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have found something. The problem here is that when we are creating the process, we are not using the pipedinputstream, so it remains there to listen for an input forever.
In the finally part of the execute method, you can say something like this:
process.getStdin().close;
this will send an EOF to the stream itself, terminating the thread that is trying to read it.
Hello,
After executing commands with a WinRM connection, I can see in Visual VM many living Threads "Input reader for ..." (with OverThere 2.2.2).
These threads are created by
CifsWinRmConnection#startProcess
and stuck inPipedInputStream#read
.I can fix this issue by adding the following line:
processInputReaderThead.interrupt();
in the finally block of the method waitFor() of the OverthereProcess returned.
Do you see a better way to solve it?
Thanks,
Eric.
The text was updated successfully, but these errors were encountered: