I just posted it on JIRA: https://issues.apache.org/jira/browse/SSHD-188
About the new release, do you have a rough estimation on when it will be released? (1 week, 1 month, 5 months..) Because we need to release our software shortly we have to decide whether we can wait for it. Thanks for the help! Maarten 2012/9/18 Guillaume Nodet <[email protected]> > I suppose that's a bug. Could you please raise a JIRA issue and I'll try > to fix it asap. > I'm planning on a 0.8.0 release very soon, so it could be integrated. > > On Tue, Sep 18, 2012 at 2:40 PM, Maarten Smit <[email protected] > >wrote: > > > I tested it quite well, here is the case: > > > > When creating the ssh server I have this: > > > > sshd.setShellFactory(new PseudoTerminalFactory("/system/bin/sh", "-i")); > > > > The PseudoTerminalFactory has this: > > > > @Override > > public Command create() { > > return new InvertedShellWrapper(new PseudoTerminal()); > > } > > > > And the "PseudoTerminal implements InvertedShell" contains the following > > functions: > > > > destroy() > > exitValue() > > getErrorStream() > > getInputStream() > > getOutputStream() > > isAlive() > > start(Map<String, String> env) > > > > Now here is the thing, when a session is created and the user: > > - closes it > > - or the server is stopped > > The destroy and exitValue functions are being called. In the destroy > > function we stop the shell process (which is started in the start > > function). > > > > However, if a user has a shell connection and doesn't do anything, > default > > after 10 minutes the idletimeout will have passed and the user gets a > > timeout error and gets disconnected. HOWEVER, after that the destroy and > > exitValue are never called, so the isAlive function will continue being > > called (always returns true till the destroy function is called) and we > > will have an endless running thread. > > Next time we start the server we get an error the port is in use, etc. > And > > all the time the checking of isAlive of that session will just continue. > > > > So is there a solution? Or am I missing something.. > > > > Thanks! > > > > > > > > > > > > 2012/9/10 Maarten Smit <[email protected]> > > > > > Hello, > > > > > > I have implemented my own ShellFactory. Everything works ok now, if the > > > user connects and disconnects the destroy function of the custom > > > shellfactory is called. However, when a user is connected (for example > > > through putty) and the connection timeouts the user is disconnected but > > the > > > destroy function of the shellfactory isn't called.. So the shell > session > > is > > > still running while the user is disconnected.. > > > > > > Maybe someone can help? Since setting the idle timer to 0 isn't really > an > > > option. > > > > > > Thanks! > > > > > > Maarten > > > > > > > > > -- > ------------------------ > Guillaume Nodet > ------------------------ > Blog: http://gnodet.blogspot.com/ > ------------------------ > FuseSource, Integration everywhere > http://fusesource.com >
