Skip to content

Commit cedf4ba

Browse files
author
Greg Hendershott
committed
racket--cmd-disconnect: Always set racket--cmd-connecting-p to nil
I noticed when testing on Windows, that sometimes the connection would not succeed, and furthermore get stuck in a state where racket--cmd-connecting-p was left non-nil. This commit fixed that for me. Although this might have some bearing on issue #344 and issue #348, I don't have any reason to think this fixes those.
1 parent ce10c37 commit cedf4ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

racket-repl.el

+2-2
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ wait for the connection to be established."
346346

347347
(defun racket--cmd-disconnect ()
348348
"Disconnect from the Racket command process."
349+
(setq racket--cmd-connecting-p nil)
349350
(when racket--cmd-proc
350351
;; Sentinel calls us for "deleted" event, which we ourselves will
351352
;; trigger with the `delete-process' below. So set
@@ -354,8 +355,7 @@ wait for the connection to be established."
354355
(buf (prog1 racket--cmd-buf (setq racket--cmd-buf nil))))
355356
(delete-process proc)
356357
(kill-buffer buf)
357-
(clrhash racket--cmd-nonce->callback)
358-
(setq racket--cmd-connecting-p nil))))
358+
(clrhash racket--cmd-nonce->callback))))
359359

360360
(defun racket--cmd-process-filter (_proc string)
361361
(let ((buffer racket--cmd-buf))

0 commit comments

Comments
 (0)