]> git.eshelyaron.com Git - emacs.git/commitdiff
Do use eglot-connect-timeout if eglot-sync-connect is t
authorJoão Távora <joaotavora@gmail.com>
Mon, 10 Oct 2022 12:57:26 +0000 (13:57 +0100)
committerJoão Távora <joaotavora@gmail.com>
Thu, 20 Oct 2022 09:50:47 +0000 (10:50 +0100)
Reported by Eli Zaretskii <eliz@gnu.org>

* eglot.el (eglot--connect): Use eglot-connect-timeout in the case
eglot-sync-connect is t.

lisp/progmodes/eglot.el

index d3f5935a9ef86a03b4eafdfda586ec6f20b34e9c..18523067fa083dc77047df598bfa987d8144e5ee 100644 (file)
@@ -1282,7 +1282,8 @@ in project `%s'."
                      (cond ((numberp eglot-sync-connect)
                             (accept-process-output nil eglot-sync-connect))
                            (eglot-sync-connect
-                            (while t (accept-process-output nil 30)))))))
+                            (while t (accept-process-output
+                                      nil eglot-connect-timeout)))))))
               (pcase retval
                 (`(error . ,msg) (eglot--error msg))
                 (`nil (eglot--message "Waiting in background for server `%s'"