alphapapa / plz.el

An HTTP library for Emacs
GNU General Public License v3.0
200 stars 11 forks source link

plz-clear should ensure processes are live before trying to kill them #33

Closed alphapapa closed 1 year ago

alphapapa commented 1 year ago

See this backtrace:

Debugger entered--Lisp error: (error "Process plz-request-curl<4> is not active")
  kill-process(#<process plz-request-curl<4>>)
  plz-clear(#s(plz-queue :limit 8 :active ... :requests ... :canceled-p t :first-active nil :last-active nil :first-request ... :last-request ... :finally #f(compiled-function () #<bytecode 0x157b8fcd04e9>)))
  hyperdrive-handler-directory(#s(hyperdrive-entry :hyperdrive ... :name "/" :path "/" :headers nil :modified nil :size nil :version nil :type "application/js..." :etc ...) :then nil)
  hyperdrive-handler-json(#s(hyperdrive-entry :hyperdrive ... :name "/" :path "/" :headers nil :modified nil :size nil :version nil :type "application/js..." :etc ...) :then nil)
  #f(compiled-function (entry) #<bytecode 0x157b8f4037f1>)(#s(hyperdrive-entry :hyperdrive ... :name "/" :path "/" :headers nil :modified nil :size nil :version nil :type "application/js..." :etc ...))
  #f(compiled-function (response) #<bytecode 0x157b8fdc607d>)(#s(plz-response :version 1.1 :status 204 :headers ((accept-ranges . "bytes") (allow . "HEAD,GET") (content-type . "application/json") (etag . "8194") (link . "<hyper://sw8dj5y9cs5nb8dzq1h9tbjt3b4u3sci6wfeckbsc...") (date . "Fri, 30 Jun 2023 21:14:41 GMT") (connection . "keep-alive") (keep-alive . "timeout=5")) :body ""))
  #f(compiled-function () #<bytecode 0x157b8feda0ad>)()
  plz--respond(#<process plz-request-curl<8>> #<buffer  *plz-request-curl*-518987> "finished\n")
  apply(plz--respond (#<process plz-request-curl<8>> #<buffer  *plz-request-curl*-518987> "finished\n"))
  timer-event-handler([t 25759 17857 997679 nil plz--respond (#<process plz-request-curl<8>> #<buffer  *plz-request-curl*-518987> "finished\n") nil 205000])
alphapapa commented 1 year ago

Fixed in 5cd6fa19fadc27e73d1ffa17508edea30877b328.