GNU bug report logs - #20159
24.4; url-retrieve invokes same callback twice with kill-buffer

Previous Next

Package: emacs;

Reported by: Christopher Wellons <wellons <at> nullprogram.com>

Date: Sat, 21 Mar 2015 20:47:01 UTC

Severity: normal

Tags: confirmed

Found in version 24.4

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #38 received at 20159 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Christopher Wellons <wellons <at> nullprogram.com>
Cc: 20159 <at> debbugs.gnu.org
Subject: Re: bug#20159: 24.4;
 url-retrieve invokes same callback twice with kill-buffer
Date: Fri, 25 Dec 2015 19:30:23 +0100
Christopher Wellons <wellons <at> nullprogram.com> writes:

>     ;;; -*- lexical-binding: t; -*-
>     (let ((calls 0))
>       (url-retrieve "http://localhost:1/"
>                     (lambda (_)
>                       (assert (= 1 (cl-incf calls)))
>                       (kill-buffer))))
>
> When I eval the above expression, the assertion fails asynchronously.
>
>     error in process sentinel: Assertion failed: (= 1 (cl-incf calls))

Eli fixed something related to this, but the bug still remains.  I used
this version:

;;; -*- lexical-binding: t; -*-
(let ((calls 0))
  (url-retrieve "http://localhost:1/"
                (lambda (status)
		  (message "%s '%s'" calls status)
                  (assert (= 1 (cl-incf calls)))
		  (kill-buffer))))

These are the messages:

Contacting host: localhost:1
#<buffer  *http localhost:1*-537967>
0 ’(:error (error connection-failed failed with code 111
 :host localhost :service 1))’
1 ’(:error (error connection-failed deleted
 :host localhost :service 1) :error (error connection-failed failed with code 111
 :host localhost :service 1))’

The second message is...  pretty weird...

Anybody have a guess why this happens?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 9 years and 81 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.