[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/rcirc-update a66fd7b: Fix double reconnection bug
From: |
Philip Kaludercic |
Subject: |
feature/rcirc-update a66fd7b: Fix double reconnection bug |
Date: |
Fri, 10 Sep 2021 13:53:14 -0400 (EDT) |
branch: feature/rcirc-update
commit a66fd7bb37d77940b28cfd9f48a2374e1d373245
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Fix double reconnection bug
* rcirc.el (rcirc-sentinel): Don't reconnect if reconnecting
(reconnect): Use delete-process instead of kill-process
---
lisp/net/rcirc.el | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 2bdc3d6..eb6703a 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -841,7 +841,8 @@ When 0, do not auto-reconnect."
(not rcirc-target))
(rcirc-disconnect-buffer)))
(when (and (string= sentinel "deleted")
- (< 0 rcirc-reconnect-delay))
+ (< 0 rcirc-reconnect-delay)
+ (not rcirc-connecting))
(let ((now (current-time)))
(when (or (null rcirc-last-connect-time)
(time-less-p rcirc-reconnect-delay
@@ -2580,13 +2581,9 @@ to `rcirc-default-part-reason'."
(interactive "i")
(with-rcirc-server-buffer
(catch 'exit
- (cond
- (rcirc-connecting
- (when (process-live-p process)
- (kill-process process))
- (setq rcirc-connecting nil))
- ((process-live-p process)
- (throw 'exit (message "Server process is alive"))))
+ (if (eq (process-status process) 'open)
+ (throw 'exit (message "Server process is alive"))
+ (delete-process process))
(let ((conn-info rcirc-connection-info))
(setf (nth 5 conn-info)
(cl-remove-if-not #'rcirc-channel-p
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- feature/rcirc-update a66fd7b: Fix double reconnection bug,
Philip Kaludercic <=