[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#20159: 24.4; url-retrieve invokes same callback twice with kill-buff
From: |
Eli Zaretskii |
Subject: |
bug#20159: 24.4; url-retrieve invokes same callback twice with kill-buffer |
Date: |
Sat, 21 Mar 2015 23:00:51 +0200 |
> From: Christopher Wellons <wellons@nullprogram.com>
> Date: Sat, 21 Mar 2015 16:46:16 -0400
>
>
> ;;; -*- 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))
>
> I expect the callback given to `url-retrieve' to never be invoked more
> than once each time it's passed to `url-retrieve'. Ideally I expect it
> to be called exactly once for each call to `url-retrieve', always
> delivering errors asynchronously.
>
> I also tested this on a Windows build of Emacs. The callback is invoked
> zero times because the connection error is delivered synchronously at
> the call to `url-retrieve' (which I now realize explains why connection
> queuing doesn't work right on Windows). So even if the double-invoke
> problem is fixed for Linux, the behavior still differs across platforms.
I don't understand what you mean by "error is delivered synchronously
at the call", and by "connection queuing doesn't work right". Please
consider elaborating on those 2 points.
Thanks.
- bug#20159: 24.4; url-retrieve invokes same callback twice with kill-buffer, Christopher Wellons, 2015/03/21
- bug#20159: 24.4; url-retrieve invokes same callback twice with kill-buffer,
Eli Zaretskii <=
- bug#20159: 24.4; url-retrieve invokes same callback twice with kill-buffer, Christopher Wellons, 2015/03/21
- bug#20159: 24.4; url-retrieve invokes same callback twice with kill-buffer, Eli Zaretskii, 2015/03/22
- bug#20159: 24.4; url-retrieve invokes same callback twice with kill-buffer, Eli Zaretskii, 2015/03/27
- bug#20159: 24.4; url-retrieve invokes same callback twice with kill-buffer, Andy Moreton, 2015/03/27
- bug#20159: 24.4; url-retrieve invokes same callback twice with kill-buffer, Eli Zaretskii, 2015/03/27
- bug#20159: 24.4; url-retrieve invokes same callback twice with kill-buffer, Eli Zaretskii, 2015/03/27
- bug#20159: 24.4; url-retrieve invokes same callback twice with kill-buffer, Eli Zaretskii, 2015/03/28
- bug#20159: 24.4; url-retrieve invokes same callback twice with kill-buffer, Andy Moreton, 2015/03/28
- bug#20159: 24.4; url-retrieve invokes same callback twice with kill-buffer, Eli Zaretskii, 2015/03/28