unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Christopher Wellons <wellons@nullprogram.com>
Cc: 20159@debbugs.gnu.org
Subject: bug#20159: 24.4; url-retrieve invokes same callback twice with kill-buffer
Date: Fri, 25 Dec 2015 19:30:23 +0100	[thread overview]
Message-ID: <87si2qxtxc.fsf@gnus.org> (raw)
In-Reply-To: <87k2ya3wpz.fsf@wellocc1-ld2.jhuapl.edu> (Christopher Wellons's message of "Sat, 21 Mar 2015 16:46:16 -0400")

Christopher Wellons <wellons@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





  parent reply	other threads:[~2015-12-25 18:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-21 20:46 bug#20159: 24.4; url-retrieve invokes same callback twice with kill-buffer Christopher Wellons
2015-03-21 21:00 ` Eli Zaretskii
2015-03-21 21:48   ` Christopher Wellons
2015-03-22 17:31     ` Eli Zaretskii
2015-03-27  9:52       ` Eli Zaretskii
2015-03-27 16:59         ` Andy Moreton
2015-03-27 19:22           ` Eli Zaretskii
2015-03-27 19:40             ` Eli Zaretskii
2015-03-28  7:39               ` Eli Zaretskii
2015-03-28 10:56                 ` Andy Moreton
2015-03-28 11:28                   ` Eli Zaretskii
2015-12-25 18:30 ` Lars Ingebrigtsen [this message]
2016-03-01  4:04   ` Lars Ingebrigtsen
2016-03-01  4:08   ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87si2qxtxc.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=20159@debbugs.gnu.org \
    --cc=wellons@nullprogram.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).