Reputation: 145
How would I or do I need to close the session when I use the jcabi ssh library to execute a shell command when I do something like the following? I suspect I'm running out of sockets when I pair this in a looping scenario.
`Shell shell = new SSH(server, 22, "ubuntu", ReadPemFile());
return new Shell.Plain(shell).exec("some shell command");`
Thank you. I couldn't find anything.
Upvotes: 2
Views: 700
Reputation: 105143
Good question (I'm one of the authors of jcabi-ssh)... We disconnect but I'm not sure about closing. Would be great if you can submit an issue to GitHub and we'll try to figure out what's going on and maybe fix the bug.
Upvotes: 2