From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#20159: 24.4; url-retrieve invokes same callback twice with kill-buffer Date: Tue, 01 Mar 2016 15:04:37 +1100 Message-ID: <871t7uyhbe.fsf@gnus.org> References: <87k2ya3wpz.fsf@wellocc1-ld2.jhuapl.edu> <87si2qxtxc.fsf@gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1456805183 3924 80.91.229.3 (1 Mar 2016 04:06:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Mar 2016 04:06:23 +0000 (UTC) Cc: 20159@debbugs.gnu.org To: Christopher Wellons Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 01 05:06:12 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aabZb-0001UY-DV for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Mar 2016 05:06:11 +0100 Original-Received: from localhost ([::1]:40672 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aabZa-0006BD-R7 for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Feb 2016 23:06:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aabZW-00069s-AT for bug-gnu-emacs@gnu.org; Mon, 29 Feb 2016 23:06:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aabZS-0005CX-Fk for bug-gnu-emacs@gnu.org; Mon, 29 Feb 2016 23:06:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57441) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aabZS-0005CT-C8 for bug-gnu-emacs@gnu.org; Mon, 29 Feb 2016 23:06:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aabZS-0000Qs-6Y for bug-gnu-emacs@gnu.org; Mon, 29 Feb 2016 23:06:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Mar 2016 04:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20159 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 20159-submit@debbugs.gnu.org id=B20159.14568051211616 (code B ref 20159); Tue, 01 Mar 2016 04:06:02 +0000 Original-Received: (at 20159) by debbugs.gnu.org; 1 Mar 2016 04:05:21 +0000 Original-Received: from localhost ([127.0.0.1]:54568 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aabYj-0000Pw-Fl for submit@debbugs.gnu.org; Mon, 29 Feb 2016 23:05:21 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:39099) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aabYe-0000Pl-Jw for 20159@debbugs.gnu.org; Mon, 29 Feb 2016 23:05:16 -0500 Original-Received: from 109.179.133.80.tmi.telenormobil.no ([109.179.133.80] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aabYF-0001zZ-CJ; Tue, 01 Mar 2016 05:04:48 +0100 In-Reply-To: <87si2qxtxc.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 25 Dec 2015 19:30:23 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-MailScanner-ID: 1aabYF-0001zZ-CJ MailScanner-NULL-Check: 1457409888.56349@gsyiwCv1I/JtPkgkqKB6Ug X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:114214 Archived-At: Lars Ingebrigtsen writes: > 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 (=3D 1 (cl-incf calls))) > (kill-buffer)))) > > These are the messages: > > Contacting host: localhost:1 > # > 0 =92(:error (error connection-failed failed with code 111 > :host localhost :service 1))=92 > 1 =92(:error (error connection-failed deleted > :host localhost :service 1) :error (error connection-failed failed with = code 111 > :host localhost :service 1))=92 > > The second message is... pretty weird... > > Anybody have a guess why this happens? I've done some further debugging, and what's happening is (simply, ahem) that when we get a "connection failed" message from the sentinel, and then kill the buffer, we also kill the process, and then the sentinel is called again, and then it calls our callback again. So the weird thing is that the process isn't already dead, kinda... Or something... --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no