samueleaton / autossh

Persistent SSH tunnels
https://www.npmjs.com/package/autossh
59 stars 16 forks source link

retry timeout. #7

Closed overflowz closed 7 years ago

overflowz commented 7 years ago

Hi, I'd like to set timeout on retries. e.g when internet is off, I'd like to wait for 2-3 seconds before re-attempting the connection.

Because restarting immediately consumes a lot of CPU power, thus I'm running it on my raspberry PI, which seems overkill for that.

Regards.

samueleaton commented 7 years ago

This already existed in the code as pollTimeout but was not exposed to the public and was set to be 75ms by default. I made a simple change so its exposed now.

See Adjusting Poll Timeout in the README