Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

session.setTimeout(60000); #43

Open
nevishs opened this issue Jun 25, 2020 · 2 comments
Open

session.setTimeout(60000); #43

nevishs opened this issue Jun 25, 2020 · 2 comments

Comments

@nevishs
Copy link

nevishs commented Jun 25, 2020

Greetings,

Is there a way to implement session timeout?

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

@SatExo
Copy link

SatExo commented Jul 8, 2020

Hi, yes this would be very useful.

@nevishs
Copy link
Author

nevishs commented Aug 23, 2020

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];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants