flutter_ssh icon indicating copy to clipboard operation
flutter_ssh copied to clipboard

session.setTimeout(60000);

Open nevishs opened this issue 4 years ago • 2 comments

Greetings,

Is there a way to implement session timeout?

I know that in jsch you can invoke: session.setTimeout(60000);

nevishs avatar Jun 25 '20 21:06 nevishs

Hi, yes this would be very useful.

SatExo avatar Jul 08 '20 14:07 SatExo

As a workaround for android devices, you can have the following at line 246 at SshPlugin.java

session.setConfig(properties);
session.setTimeout(10000);
session.connect();

So every session will have a timeout of 10 secs.

For IOS, it seems to have a default timeout of 10 secs. NSString* response = [session.channel execute:command error:&error timeout:@10];

nevishs avatar Aug 23 '20 21:08 nevishs