Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Auto reconnect Delay #28

Closed
WiredWonder opened this issue Mar 22, 2012 · 7 comments
Closed

Auto reconnect Delay #28

WiredWonder opened this issue Mar 22, 2012 · 7 comments
Assignees

Comments

@WiredWonder
Copy link

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
Copy link

bVector commented Mar 24, 2012

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.

@ghost ghost assigned FauxFaux Mar 29, 2012
@FauxFaux
Copy link
Owner

FauxFaux commented Apr 3, 2012

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
Copy link

ferreol commented May 16, 2012

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
Copy link

ferreol commented May 16, 2012

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();
}

@WiredWonder
Copy link
Author

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 added a commit that referenced this issue Jul 14, 2013
@FauxFaux
Copy link
Owner

putty-reconnect-delay

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

FauxFaux added a commit that referenced this issue Jul 14, 2013
FauxFaux added a commit that referenced this issue Jul 14, 2013
FauxFaux added a commit that referenced this issue Aug 6, 2013
FauxFaux added a commit that referenced this issue Aug 7, 2013
FauxFaux added a commit that referenced this issue Aug 11, 2013
@WiredWonder
Copy link
Author

Can this issue be reopened? 0.65-t026 has lost this delay widget meaning all my sessions won't reconnect on wake. Please put it back!

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

No branches or pull requests

4 participants