Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Auto reconnect Delay #28

Closed
galapogos01 opened this Issue · 6 comments

4 participants

@galapogos01

My machine takes 5 or so seconds to bring the NIC up when coming out of sleep. As a result, the Auto reconnect function gives me a host not found error and aborts the connection, closing the window.

Two suggestions:

  1. Include a delay (or a retry for 5 seconds?)
  2. Leave the window open if the reconnect fails
@bVector

I have this same issue, but only on wireless. When I resume from suspend with a network cable plugged in, it works as intended, but the additional time for the system to bring up the wireless causes the connect to fail and the window to be closed.

@FauxFaux FauxFaux was assigned
@FauxFaux
Owner

I have not the slightest clue why window.c#connection_fatal decides to exit when wakeup_reconnect triggers start_backend, but not when IDM_RECONNECT triggers start_backend. "handlers", perhaps.

@ferreol

Hi,
I use a HomePlug AV Powerline device. It goes to sleep when it detects the computer goes to sleep, so at wakeup, it does take a few seconds to reconnect. So I get the same "host does not exist" error and it does not reconnect automatically

@ferreol

adding a sleep in windows/window.c (with a parameter) does fix my problem,though

case PBT_APMQUERYSUSPENDFAILED:
if(session_closed && !back) {
time_t tnow = time(NULL);

if(last_reconnect && (tnow - last_reconnect) < 5) {
Sleep(1000);
}
/* some UI configurable delay, needed by the interface to wake up and reconnect properly*/
Sleep(1000*SOME_DELAY_IN_SECONDS);
last_reconnect = tnow;
logevent(NULL, "Woken up from suspend, reconnecting...");
term_pwron(term, FALSE);
start_backend();
}
@galapogos01

Didn't realise i'd previously raised this :/

Would it be possible to just add the sleep in the next build? Not sure anyone would even notice, most screens take more than 1s to turn on. Unsure whether 1s would be enough in my scenario, however.

@FauxFaux
Owner

putty-reconnect-delay

User configurable wakeup delay (well, more of a hang), at the same place @ferreol suggested, done!

@FauxFaux FauxFaux closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.