Skip to content

Commit c749245

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. ----------------------------------------------------------------- PROVENANCE: Today I noticed commit 98bb9c7 and commit cedf4ba linked to from the above issues. But I do not have either commit in any of my local repos, not even according to `git fsck --lost-found`. WAT. I suspect what happened was that I made a topic branch and pushed a commit, which is why GitHub got it (and apparently will keep it indefinitely because of the link from comments). But then I deleted the branch without merging. Or possibly that commit was rebased away before merging the branch. Probably this happened on a new Windows laptop. In my defense, mid-January I was moving between Mac and Windows, as part of an effort to improve racket-mode support on the latter. And then, a Linux laptop got added to the mix, as well. In any case I'm going to recover and use this commit, now. The bit above the horizontal line is the commit message.
1 parent be20fc4 commit c749245

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
@@ -362,6 +362,7 @@ wait for the connection to be established."
362362

363363
(defun racket--cmd-disconnect ()
364364
"Disconnect from the Racket command process."
365+
(setq racket--cmd-connecting-p nil)
365366
(when racket--cmd-proc
366367
;; Sentinel calls us for "deleted" event, which we ourselves will
367368
;; trigger with the `delete-process' below. So set
@@ -370,8 +371,7 @@ wait for the connection to be established."
370371
(buf (prog1 racket--cmd-buf (setq racket--cmd-buf nil))))
371372
(delete-process proc)
372373
(kill-buffer buf)
373-
(clrhash racket--cmd-nonce->callback)
374-
(setq racket--cmd-connecting-p nil))))
374+
(clrhash racket--cmd-nonce->callback))))
375375

376376
(defun racket--cmd-process-filter (_proc string)
377377
(let ((buffer racket--cmd-buf))

0 commit comments

Comments
 (0)