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

Failure to reconnect when remote host referenced via (dynamic) dns #110

Closed
puterboy opened this issue Oct 22, 2013 · 2 comments
Closed

Failure to reconnect when remote host referenced via (dynamic) dns #110

puterboy opened this issue Oct 22, 2013 · 2 comments

Comments

@puterboy
Copy link

PuTTYTray reconnects just fine when my host name is found in my Windows hosts file.

However, when I use a remote host name that uses (dynamic) DNS (e.g., mymachine.dyndns.org), it times out with the following error message:

 Unable to open connection to
     mymachine.dyndns.org
 Host does not exist

Pressing "OK" (the only option), then causes PuTTYTray to exit.

Shouldn't PuTTYTray realize that the non-existence of a host (presumably non response from a dns-type query) is exactly what one would expect when the Internet connection is down... so that PuTTYTray should continue waiting to reconnect rather than throwing an error message and exiting

FauxFaux added a commit that referenced this issue Oct 29, 2013
Allow connection_fatal to trigger a reconnect attempt, which, if there is
still an issue, which eventually call connection_fatal.  This causes us to
retry indefinitely.  Maybe eventually we'll need to limit this somehow
(exponential backoff?).

Also:
 * Remove wakeup reconnect delay.  Infinite reconnects will fix this itself.
 * Make a dns error a normal connection_fatal.  Oh dear, oh dear.  This was
     hardcoded to just messagebox and outright exit(0);.  Now we keep
     going for a tiny bit, so that we can run the normal cleanup code.
     This is the tiny cleanups to ssh.c.
@FauxFaux
Copy link
Owner

You've done it now. Whole load of horrors in that commit which should fix this (among other things).

You need to turn on both reconnect modes to get everything to "work". See the commit.

@puterboy
Copy link
Author

Thanks! Seems to work fine now...

As you hinted to in your commit, it might be nice to be able to control the rate at which it tries to reconnect.
My first choice would be to have an option to specify the time between reconnect attempts.
While an exponential algorithm is nice, I think for people who are away from connections for variable amount of times just having a fixed rate might be nice -- i.e., some people may want instant gratitude and not want to lose a moment of potential connection so they want frequent connection re-attempts. Others, may be willing to wait 30 seconds or a minute or 5 minutes rather than having it constantly seek reconnection...

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

2 participants