From: Michael Albinus <michael.albinus@gmx.de>
To: Visuwesh <visuweshm@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Tramp timeout for currently unreachable connections?
Date: Thu, 12 Sep 2024 19:27:24 +0200 [thread overview]
Message-ID: <87bk0sixz7.fsf@gmx.de> (raw)
In-Reply-To: <87a5gc6gjd.fsf@gmail.com> (Visuwesh's message of "Thu, 12 Sep 2024 20:54:54 +0530")
Visuwesh <visuweshm@gmail.com> writes:
> Hello Michael,
Hi Visuwesh,
>>> I know that non-essential=t prevents Tramp from establishing new
>>> connections but is there a way to make Tramp use a very short timeout
>>> when trying to connect to a previously established connection that is
>>> now unreachable? What I mean is: if I am connected to a remote host via
>>> a ssh connection /ssh:user@remote: and my internet connection goes down,
>>> I do not want Tramp trying to fetch remote resources forever.
>>
>> Use 'M-x tramp-cleanup-connection'.
>
> I can always C-g and execute this command but I would like to do it
> automagically in my lisp programs so, unfortunately, this isn't exactly
> an option. Half the time, I forget the freezes are due to Tramp
> inability to speak with the remote machine too...
Ah, I thought you're speaking about the interactive case.
>> Play with user option `tramp-connection-timeout'.
>
> If I let-bind tramp-connection-timeout to 1 in the above example, Tramp
> still tries to talk with the remote machine. :-( Am I misunderstanding
> your suggestion? Should I be using with-(tramp-)timeout?
tramp-connection-timeout is of help only for establishing a new
connection. That's why I've mentioned it, in conjuntion with
tramp-cleanup-connection.
> Thank you for your answers.
Best regards, Michael.
next prev parent reply other threads:[~2024-09-12 17:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-12 14:32 Tramp timeout for currently unreachable connections? Visuwesh
2024-09-12 14:47 ` Michael Albinus
2024-09-12 15:24 ` Visuwesh
2024-09-12 17:27 ` Michael Albinus [this message]
2024-09-12 15:27 ` Robert Pluim
2024-09-12 17:14 ` Visuwesh
2024-09-12 17:37 ` Michael Albinus
2024-09-12 17:45 ` Visuwesh
2024-09-12 17:22 ` Michael Albinus
2024-09-12 17:35 ` Visuwesh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bk0sixz7.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=help-gnu-emacs@gnu.org \
--cc=visuweshm@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).