1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Don't recurse in erc-server-delayed-check-reconnect

* lisp/erc/erc-backend.el (erc-server-delayed-check-reconnect): Run
`reschedule' function on a timer to avoid growing the stack when
calling `delete-process'.
* lisp/erc/erc-common.el (erc--favor-changed-reverted-modules-state):
Fix `pcase' condition so that changing an option to its standard value
does not earn a "STANDARD" label in Customize if that value differs
from the saved one.
* lisp/erc/erc.el (erc-open-socks-tls-stream): Reword doc string.
* test/lisp/erc/erc-tests.el (erc--with-dependent-type-match)
(erc--with-dependent-type-match): Remove useless tests (bug#71178).
* test/lisp/erc/resources/base/reconnect/unexpected-disconnect.eld:
Await phantom EOFs and PINGs to somewhat account for a race that can
result in a failure when running the suite in parallel with -jN.
* test/lisp/erc/resources/erc-scenarios-common.el
(erc-scenarios-common--print-trace): Set `debug-on-error' to t
so that errors in timers always trigger test failures.
;; * test/lisp/erc/resources/base/assoc/reconplay/foonet.eld:
;; Timeouts.
;; * test/lisp/erc/resources/base/upstream-reconnect/soju-barnet.eld:
;; Timeouts.
;; * test/lisp/erc/resources/base/mask-target-routing/foonet.eld:
;; Timeouts.
;; * test/lisp/erc/resources/join/network-id/barnet.eld: Timeout.
This commit is contained in:
F. Jason Park 2024-05-28 00:32:13 -07:00
parent ec8c0b0d0d
commit 50b134c4dc
10 changed files with 24 additions and 44 deletions

View file

@ -885,7 +885,7 @@ Expect BUFFER to be the server buffer for the current connection."
(time-convert nil 'integer))))
((or "connection broken by remote peer\n"
(rx bot "failed"))
(funcall reschedule proc)))))
(run-at-time nil nil reschedule proc)))))
(filter (lambda (proc _)
(delete-process proc)
(with-current-buffer buffer

View file

@ -191,7 +191,7 @@ widget runs its set function.")
"Be more nuanced in displaying Custom state of `erc-modules'.
When `customized-value' differs from `saved-value', allow widget
to behave normally and show \"SET for current session\", as
though `customize-set-variable' or similar had been applied.
though `customize-set-variable' or similar has been applied.
However, when `customized-value' and `standard-value' match but
differ from `saved-value', prefer showing \"CHANGED outside
Customize\" to prevent the widget from seeing a `standard'
@ -207,7 +207,7 @@ instead of a `set' state, which precludes any actual saving."
(funcall (get 'erc-modules 'custom-set) 'erc-modules
(funcall op (erc--normalize-module-symbol name) erc-modules))
(when (equal (pcase (get 'erc-modules 'saved-value)
(`((quote ,saved) saved)))
(`((quote ,saved)) saved))
erc-modules)
(customize-mark-as-set 'erc-modules)))

View file

@ -2951,15 +2951,16 @@ PARAMETERS should be a sequence of keywords and values, per
(defun erc-open-socks-tls-stream (name buffer host service &rest parameters)
"Connect to an IRC server via SOCKS proxy over TLS.
Defer to the `socks' and `gnutls' libraries to make the actual
connection and perform TLS negotiation. Expect SERVICE to be a
TLS port number and that the plist PARAMETERS contains a
`:client-certificate' pair when necessary. Otherwise, assume the
arguments NAME, BUFFER, and HOST to be acceptable to
`open-network-stream' and that users know to check out
`erc-server-connect-function' and Info node `(erc) SOCKS' for
more info, including an important example of how to \"wrap\" this
function with SOCKS credentials."
Perform the duties required of an `erc-server-connect-function'
implementer, and return a network process. Defer to the `socks'
and `gnutls' libraries to make the connection and handle TLS
negotiation. Expect SERVICE to be a TLS port number and
PARAMETERS to be a possibly empty plist containing items like a
`:client-certificate' pair. Pass NAME, BUFFER, and HOST directly
to `open-network-stream'. Beyond that, operate as described in
Info node `(erc) SOCKS', and expect users to \"wrap\" this
function with `let'-bound credentials when necessary, as shown in
the example."
(require 'gnutls)
(require 'socks)
(let ((proc (socks-open-network-stream name buffer host service))