]> git.eshelyaron.com Git - emacs.git/commitdiff
Revert last change in tramp-maybe-open-connection)
authorMichael Albinus <michael.albinus@gmx.de>
Tue, 15 Dec 2020 11:50:50 +0000 (12:50 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Tue, 15 Dec 2020 11:50:50 +0000 (12:50 +0100)
* lisp/net/tramp-sh.el (tramp-maybe-open-connection): Revert last change,
it causes trouble.

lisp/net/tramp-sh.el

index e9814cdadb97f137e6f22ff79b341cd8141cdbaa..f4a93c840cfa43b1b503495e2d5a3e40acce4733 100644 (file)
@@ -4960,9 +4960,10 @@ connection if a previous connection has died for some reason."
        (when (and (time-less-p
                    60 (time-since
                        (tramp-get-connection-property p "last-cmd-time" 0)))
-                  (process-live-p p)
-                  (tramp-get-connection-property p "connected" nil))
-         (unless (tramp-send-command-and-check vec "echo are you awake")
+                  (process-live-p p))
+         (tramp-send-command vec "echo are you awake" t t)
+         (unless (and (process-live-p p)
+                      (tramp-wait-for-output p 10))
            ;; The error will be caught locally.
            (tramp-error vec 'file-error "Awake did fail")))
       (file-error