Johan Lindquist wrote:

I am using the VFS library to connect to a remote SFTP server and it is working fine but it seems there is a thread hanging in the jsch libraries (assuming it is the SSH session) ... Even if I call close on the file objects the thread doesn't stop - is there another way to shut down the remote jsch session?


I know, this is not a solution (and maybe not even a workaround for you) - the trick is to close the FileSystemManager, if you use VFS.getManager() you could cast the returned FileSystemManager and then close it. Maybe you instantiate VFS in some other way, however it should be possible to cast anyway.

StandardFileSystemManager fsm = (StandardFileSystemManager) VFS.getManager();
fsm.close();


But this will close all files and resources allocated by this instance !!!

I will have a look how to do this more general (and maybe automatically), but this might take a while.

--
Mario


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to