Skip to content

Commit

Permalink
racket--cmd-disconnect: Always set racket--cmd-connecting-p to nil
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Greg Hendershott committed Jan 16, 2019
1 parent 704ff98 commit 98bb9c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions racket-repl.el
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ wait for the connection to be established."

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

(defun racket--cmd-process-filter (_proc string)
(let ((buffer racket--cmd-buf))
Expand Down

0 comments on commit 98bb9c7

Please sign in to comment.