erc-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Erc-commit] [commit][emacs22] Separate ping timeout and ping interval


From: mwolson
Subject: [Erc-commit] [commit][emacs22] Separate ping timeout and ping interval
Date: Sun, 14 Oct 2007 00:48:47 -0400

commit 322f045ddba8b0a34300ab524e52d7f53eccfee6
Author: Michael Olson <address@hidden>
Date:   Thu Feb 15 01:20:18 2007 +0000

    Separate ping timeout and ping interval
    
    * CREDITS: Update.
    
    * erc-backend.el (erc-server-send-ping-interval): Change to use a default
      of 30 seconds.
      (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.
    git-archimport-id: address@hidden/erc--main--0--patch-106

diff --git a/CREDITS b/CREDITS
index 0e6856b..bf10c21 100644
--- a/CREDITS
+++ b/CREDITS
@@ -158,6 +158,9 @@ Leo <sdl.web AT gmail.com>:
   * Fixed the erc-iswitchb function to only temporarily enable
     iswitchb mode if it isn't active already (4 lines changed).
 
+Vivek Dasmohapatra <vivek AT etla DOT org>:
+  * Fixed issue with reconnecting to a not-yet-dead server connection.
+
 
 ----
 
diff --git a/ChangeLog b/ChangeLog
index 2affa96..0cd504a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2007-02-15  Michael Olson  <address@hidden>
 
+       * CREDITS: Update.
+
+       * erc-backend.el (erc-server-send-ping-interval): Change to use a
+       default of 30 seconds.
+       (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.
+
        * erc.el (erc-modules): Include the name of the module in its
        description.  This should make it easier for people to find and
        enable a particular module.
diff --git a/erc-backend.el b/erc-backend.el
index 713f713..eaea8c2 100644
--- a/erc-backend.el
+++ b/erc-backend.el
@@ -411,12 +411,21 @@ protection algorithm."
 
 ;; Ping handling
 
-(defcustom erc-server-send-ping-interval 90
+(defcustom erc-server-send-ping-interval 30
   "*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")))
 
+(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'."
+  :group 'erc-server
+  :type '(choice (const nil) (integer :tag "Seconds")))
+
 (defvar erc-server-ping-handler nil
   "This variable holds the periodic ping timer.")
 (make-variable-buffer-local 'erc-server-ping-handler)
@@ -455,7 +464,7 @@ Additionally, detect whether the IRC process has hung."
       (with-current-buffer buf
         (if (> (erc-time-diff (erc-current-time)
                               erc-server-last-received-time)
-               erc-server-send-ping-interval)
+               erc-server-send-ping-timeout)
             (progn
               ;; if the process is hung, kill it
               (setq erc-server-timed-out t)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]