* bug#4048: 23.1; erc-server-reconnect-attempts does not work
@ 2009-08-09 23:42 Chong Yidong
0 siblings, 0 replies; 15+ messages in thread
From: Chong Yidong @ 2009-08-09 23:42 UTC (permalink / raw)
To: Michael Olson; +Cc: 4048, Andreas Schwab
Hi Michael,
Could you take a look at this bug report? Thanks.
Andreas Schwab <schwab@linux.m68k.org> wrote:
> When getting a connection refused from the IRC server then ERC keeps
> reconnecting infinitely despite erc-server-reconnect-attempts. This is
> because erc-server-reconnect calls erc-open, which wipes all local
> variables including erc-server-reconnect-count, rendering the increment
> in erc-process-sentinel-2 useless.
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#4048: 23.1; erc-server-reconnect-attempts does not work
@ 2009-08-05 15:16 Andreas Schwab
2010-02-10 2:29 ` Vivek Dasmohapatra
0 siblings, 1 reply; 15+ messages in thread
From: Andreas Schwab @ 2009-08-05 15:16 UTC (permalink / raw)
To: bug-gnu-emacs
When getting a connection refused from the IRC server then ERC keeps
reconnecting infinitely despite erc-server-reconnect-attempts. This is
because erc-server-reconnect calls erc-open, which wipes all local
variables including erc-server-reconnect-count, rendering the increment
in erc-process-sentinel-2 useless.
Andreas.
--
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E
"And now for something completely different."
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#4048: 23.1; erc-server-reconnect-attempts does not work
2009-08-05 15:16 Andreas Schwab
@ 2010-02-10 2:29 ` Vivek Dasmohapatra
2010-02-10 10:26 ` Andreas Schwab
0 siblings, 1 reply; 15+ messages in thread
From: Vivek Dasmohapatra @ 2010-02-10 2:29 UTC (permalink / raw)
To: 4048
I just tried connecting to localhost with M-x erc (no irc server
listening there) and I didn't see this behaviour: A few followup questions:
Is erc-server-connect-function customised?
Was this an irc connecton which was previously established, whose
connection was then killed, which erc subsequently kept trying to
connect to?
Was this a connection using tls/ssl or a regular plaintext irc connection?
I'm sure the situation you describe can arise, I may have seen something
similar myself, but merely initiating a connection to a port where no
server is listening does not suffice to reproduce it here - If you can
think of any other details which might help to reproduce this behaviour,
I'd be interested in those too.
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#4048: 23.1; erc-server-reconnect-attempts does not work
2010-02-10 2:29 ` Vivek Dasmohapatra
@ 2010-02-10 10:26 ` Andreas Schwab
2010-02-10 13:06 ` Vivek Dasmohapatra
0 siblings, 1 reply; 15+ messages in thread
From: Andreas Schwab @ 2010-02-10 10:26 UTC (permalink / raw)
To: Vivek Dasmohapatra; +Cc: 4048
Vivek Dasmohapatra <vivek@etla.org> writes:
> I just tried connecting to localhost with M-x erc (no irc server
> listening there)
You need to reconnect, not connect. erc-server-reconnect-attempts is
only used on reconnects.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#4048: 23.1; erc-server-reconnect-attempts does not work
2010-02-10 10:26 ` Andreas Schwab
@ 2010-02-10 13:06 ` Vivek Dasmohapatra
2010-02-10 13:49 ` Andreas Schwab
0 siblings, 1 reply; 15+ messages in thread
From: Vivek Dasmohapatra @ 2010-02-10 13:06 UTC (permalink / raw)
To: Andreas Schwab; +Cc: 4048
> You need to reconnect, not connect. erc-server-reconnect-attempts is
Sorry, I should have mentioned that too: Reconnecting from the "dead"
erc buffer that results from attempting to connect to localhost via
M-x erc when there is no server there does not exhibit continuous-retry
behaviour either, at least not here.
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#4048: 23.1; erc-server-reconnect-attempts does not work
2010-02-10 13:06 ` Vivek Dasmohapatra
@ 2010-02-10 13:49 ` Andreas Schwab
2010-02-10 14:19 ` Vivek Dasmohapatra
0 siblings, 1 reply; 15+ messages in thread
From: Andreas Schwab @ 2010-02-10 13:49 UTC (permalink / raw)
To: Vivek Dasmohapatra; +Cc: 4048
Vivek Dasmohapatra <vivek@etla.org> writes:
> Sorry, I should have mentioned that too: Reconnecting from the "dead"
> erc buffer that results from attempting to connect to localhost via
> M-x erc when there is no server there does not exhibit continuous-retry
> behaviour either, at least not here.
That's not a reconnect, since you were never connected.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#4048: 23.1; erc-server-reconnect-attempts does not work
2010-02-10 13:49 ` Andreas Schwab
@ 2010-02-10 14:19 ` Vivek Dasmohapatra
2010-02-10 14:28 ` Andreas Schwab
2010-02-10 14:31 ` Andreas Schwab
0 siblings, 2 replies; 15+ messages in thread
From: Vivek Dasmohapatra @ 2010-02-10 14:19 UTC (permalink / raw)
To: Andreas Schwab; +Cc: 4048
On Wed, 10 Feb 2010, Andreas Schwab wrote:
> That's not a reconnect, since you were never connected.
Well, I issued a reconnect command. What I'm trying to find out is how to
reproduce the problem.
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#4048: 23.1; erc-server-reconnect-attempts does not work
2010-02-10 14:19 ` Vivek Dasmohapatra
@ 2010-02-10 14:28 ` Andreas Schwab
2010-02-10 14:31 ` Andreas Schwab
1 sibling, 0 replies; 15+ messages in thread
From: Andreas Schwab @ 2010-02-10 14:28 UTC (permalink / raw)
To: Vivek Dasmohapatra; +Cc: 4048
Connect to the irc server by ip, then change the routing so that
connects to the ip are denied.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#4048: 23.1; erc-server-reconnect-attempts does not work
2010-02-10 14:19 ` Vivek Dasmohapatra
2010-02-10 14:28 ` Andreas Schwab
@ 2010-02-10 14:31 ` Andreas Schwab
2010-02-11 1:17 ` Vivek Dasmohapatra
1 sibling, 1 reply; 15+ messages in thread
From: Andreas Schwab @ 2010-02-10 14:31 UTC (permalink / raw)
To: Vivek Dasmohapatra; +Cc: 4048
Vivek Dasmohapatra <vivek@etla.org> writes:
> Well, I issued a reconnect command.
erc-server-reconnect-attempts is only relevant for automatic reconnects.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#4048: 23.1; erc-server-reconnect-attempts does not work
2010-02-10 14:31 ` Andreas Schwab
@ 2010-02-11 1:17 ` Vivek Dasmohapatra
2010-02-13 10:44 ` Andreas Schwab
2015-12-27 22:37 ` Lars Ingebrigtsen
0 siblings, 2 replies; 15+ messages in thread
From: Vivek Dasmohapatra @ 2010-02-11 1:17 UTC (permalink / raw)
To: Andreas Schwab; +Cc: 4048
[-- Attachment #1: Type: TEXT/PLAIN, Size: 537 bytes --]
Tags: patch
Does this patch make the problem go away? It seems to work here.
The problem was that erc-mode was killing all local variables, even when
the mode was already erc-mode : The patch makes it preserve the
reconnection count in that case, which seems to have the desired effect
without adversely affecting anything else.
[ Stomping on the route didn't work for me as the existing connection was
grandfathered in by the kernel: Installing a local ircd and shutting it
down behind the client's back worked nicely though. ]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: TEXT/x-diff; name=0001-Preserve-the-reconnection-count-when-reinitialising-.patch, Size: 572 bytes --]
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -1445,7 +1445,10 @@ Special commands:
\\{erc-mode-map}
Turning on `erc-mode' runs the hook `erc-mode-hook'."
- (kill-all-local-variables)
+ (let ((recon-count erc-server-reconnect-count) (old-mode major-mode))
+ (kill-all-local-variables)
+ (if (and (eq old-mode 'erc-mode) (integerp recon-count) (< 0 recon-count))
+ (setq erc-server-reconnect-count recon-count)))
(use-local-map erc-mode-map)
(setq mode-name "ERC"
major-mode 'erc-mode
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#4048: 23.1; erc-server-reconnect-attempts does not work
2010-02-11 1:17 ` Vivek Dasmohapatra
@ 2010-02-13 10:44 ` Andreas Schwab
2011-03-03 21:16 ` Glenn Morris
2015-12-27 22:37 ` Lars Ingebrigtsen
1 sibling, 1 reply; 15+ messages in thread
From: Andreas Schwab @ 2010-02-13 10:44 UTC (permalink / raw)
To: Vivek Dasmohapatra; +Cc: 4048
Vivek Dasmohapatra <vivek@etla.org> writes:
> Does this patch make the problem go away?
Looks good.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#4048: 23.1; erc-server-reconnect-attempts does not work
2010-02-11 1:17 ` Vivek Dasmohapatra
2010-02-13 10:44 ` Andreas Schwab
@ 2015-12-27 22:37 ` Lars Ingebrigtsen
2016-02-04 7:11 ` Lars Ingebrigtsen
2016-02-04 15:41 ` Vivek Dasmohapatra
1 sibling, 2 replies; 15+ messages in thread
From: Lars Ingebrigtsen @ 2015-12-27 22:37 UTC (permalink / raw)
To: Vivek Dasmohapatra; +Cc: Andreas Schwab, 4048
Vivek Dasmohapatra <vivek@etla.org> writes:
> Does this patch make the problem go away? It seems to work here.
>
> The problem was that erc-mode was killing all local variables, even when
> the mode was already erc-mode : The patch makes it preserve the
> reconnection count in that case, which seems to have the desired effect
> without adversely affecting anything else.
>
> [ Stomping on the route didn't work for me as the existing connection was
> grandfathered in by the kernel: Installing a local ircd and shutting it
> down behind the client's back worked nicely though. ]
IThis patch no longer applies:
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -1445,7 +1445,10 @@ Special commands:
\\{erc-mode-map}
Turning on `erc-mode' runs the hook `erc-mode-hook'."
- (kill-all-local-variables)
+ (let ((recon-count erc-server-reconnect-count) (old-mode major-mode))
+ (kill-all-local-variables)
+ (if (and (eq old-mode 'erc-mode) (integerp recon-count) (< 0 recon-count))
+ (setq erc-server-reconnect-count recon-count)))
(use-local-map erc-mode-map)
(setq mode-name "ERC"
major-mode 'erc-mode
Is this still a problem in erc in Emacs 25?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#4048: 23.1; erc-server-reconnect-attempts does not work
2015-12-27 22:37 ` Lars Ingebrigtsen
@ 2016-02-04 7:11 ` Lars Ingebrigtsen
2016-02-04 15:41 ` Vivek Dasmohapatra
1 sibling, 0 replies; 15+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-04 7:11 UTC (permalink / raw)
To: Vivek Dasmohapatra; +Cc: Andreas Schwab, 4048
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Vivek Dasmohapatra <vivek@etla.org> writes:
>
>> Does this patch make the problem go away? It seems to work here.
>>
>> The problem was that erc-mode was killing all local variables, even when
>> the mode was already erc-mode : The patch makes it preserve the
>> reconnection count in that case, which seems to have the desired effect
>> without adversely affecting anything else.
>>
>> [ Stomping on the route didn't work for me as the existing connection was
>> grandfathered in by the kernel: Installing a local ircd and shutting it
>> down behind the client's back worked nicely though. ]
>
> IThis patch no longer applies:
>
> diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
> --- a/lisp/erc/erc.el
> +++ b/lisp/erc/erc.el
> @@ -1445,7 +1445,10 @@ Special commands:
> \\{erc-mode-map}
>
> Turning on `erc-mode' runs the hook `erc-mode-hook'."
> - (kill-all-local-variables)
> + (let ((recon-count erc-server-reconnect-count) (old-mode major-mode))
> + (kill-all-local-variables)
> + (if (and (eq old-mode 'erc-mode) (integerp recon-count) (< 0 recon-count))
> + (setq erc-server-reconnect-count recon-count)))
> (use-local-map erc-mode-map)
> (setq mode-name "ERC"
> major-mode 'erc-mode
>
> Is this still a problem in erc in Emacs 25?
More information was requested, but no response was given within a
month, so I'm closing this bug report. If the problem still exists,
please reopen this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#4048: 23.1; erc-server-reconnect-attempts does not work
2015-12-27 22:37 ` Lars Ingebrigtsen
2016-02-04 7:11 ` Lars Ingebrigtsen
@ 2016-02-04 15:41 ` Vivek Dasmohapatra
1 sibling, 0 replies; 15+ messages in thread
From: Vivek Dasmohapatra @ 2016-02-04 15:41 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Andreas Schwab, 4048
> Is this still a problem in erc in Emacs 25?
It appears to have been fixed in emacs 25 in the definition
of erc-open (similar fix in a different location).
Fix was included in 68cdc4bd7a780641a45b53b8fb71431e2da1a058
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2016-02-04 15:41 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-09 23:42 bug#4048: 23.1; erc-server-reconnect-attempts does not work Chong Yidong
-- strict thread matches above, loose matches on Subject: below --
2009-08-05 15:16 Andreas Schwab
2010-02-10 2:29 ` Vivek Dasmohapatra
2010-02-10 10:26 ` Andreas Schwab
2010-02-10 13:06 ` Vivek Dasmohapatra
2010-02-10 13:49 ` Andreas Schwab
2010-02-10 14:19 ` Vivek Dasmohapatra
2010-02-10 14:28 ` Andreas Schwab
2010-02-10 14:31 ` Andreas Schwab
2010-02-11 1:17 ` Vivek Dasmohapatra
2010-02-13 10:44 ` Andreas Schwab
2011-03-03 21:16 ` Glenn Morris
2015-12-27 22:37 ` Lars Ingebrigtsen
2016-02-04 7:11 ` Lars Ingebrigtsen
2016-02-04 15:41 ` Vivek Dasmohapatra
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.