[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Erc-commit] [commit][emacs22] Permit user to disable checking the ping
From: |
mwolson |
Subject: |
[Erc-commit] [commit][emacs22] Permit user to disable checking the ping timeout |
Date: |
Sun, 14 Oct 2007 00:48:47 -0400 |
commit 95975a5aafb186f541c336af58776f61073421ab
Author: Michael Olson <address@hidden>
Date: Thu Feb 15 03:43:56 2007 +0000
Permit user to disable checking the ping timeout
* erc-backend.el (erc-server-send-ping-interval): Improve customize
interface.
(erc-server-send-ping-timeout): Ditto, and mention how to disable this.
(erc-server-send-ping): Handle case where erc-server-ping-timeout is
disabled.
git-archimport-id: address@hidden/erc--main--0--patch-107
diff --git a/ChangeLog b/ChangeLog
index 0cd504a..eeb2d27 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,12 +3,14 @@
* CREDITS: Update.
* erc-backend.el (erc-server-send-ping-interval): Change to use a
- default of 30 seconds.
+ default of 30 seconds. Improve customize interface.
(erc-server-send-ping-timeout): New option that determines when to
consider a connection stalled and restart it. The default is
after 120 seconds.
(erc-server-send-ping): Use erc-server-send-ping-timeout instead
- of erc-server-send-ping-interval.
+ of erc-server-send-ping-interval. If
+ erc-server-send-ping-timeout is nil, do not ever kill and restart
+ a hung IRC process.
* erc.el (erc-modules): Include the name of the module in its
description. This should make it easier for people to find and
diff --git a/erc-backend.el b/erc-backend.el
index eaea8c2..e2b7914 100644
--- a/erc-backend.el
+++ b/erc-backend.el
@@ -415,16 +415,20 @@ protection algorithm."
"*Interval of sending pings to the server, in seconds.
If this is set to nil, pinging the server is disabled."
:group 'erc-server
- :type '(choice (const nil) (integer :tag "Seconds")))
+ :type '(choice (const :tag "Disabled" nil)
+ (integer :tag "Seconds")))
(defcustom erc-server-send-ping-timeout 120
"*If the time between ping and response is greater than this, reconnect.
The time is in seconds.
This must be greater than or equal to the value for
-`erc-server-send-ping-interval'."
+`erc-server-send-ping-interval'.
+
+If this is set to nil, never try to reconnect."
:group 'erc-server
- :type '(choice (const nil) (integer :tag "Seconds")))
+ :type '(choice (const :tag "Disabled" nil)
+ (integer :tag "Seconds")))
(defvar erc-server-ping-handler nil
"This variable holds the periodic ping timer.")
@@ -462,9 +466,11 @@ Currently this is called by `erc-send-input'."
Additionally, detect whether the IRC process has hung."
(if (buffer-live-p buf)
(with-current-buffer buf
- (if (> (erc-time-diff (erc-current-time)
- erc-server-last-received-time)
- erc-server-send-ping-timeout)
+ (if (and erc-server-send-ping-timeout
+ (>
+ (erc-time-diff (erc-current-time)
+ erc-server-last-received-time)
+ erc-server-send-ping-timeout))
(progn
;; if the process is hung, kill it
(setq erc-server-timed-out t)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Erc-commit] [commit][emacs22] Permit user to disable checking the ping timeout,
mwolson <=