Do use eglot-connect-timeout if eglot-sync-connect is t

Reported by Eli Zaretskii <eliz@gnu.org>

* eglot.el (eglot--connect): Use eglot-connect-timeout in the case
eglot-sync-connect is t.
This commit is contained in:
João Távora 2022-10-10 13:57:26 +01:00
parent 4071eaf8ad
commit eb9d6281b5

View 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'"