Skip to content

Commit

Permalink
Merge pull request #622 from kchanqvq/master
Browse files Browse the repository at this point in the history
Close socket gracefully when `slime-quit'
  • Loading branch information
cxxxr authored May 16, 2023
2 parents fd976ed + a171cb0 commit 6d88ffb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modes/lisp-mode/lisp-mode.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
(defun remove-and-change-connection (connection)
(remove-connection connection)
(when (eq connection (current-connection))
(setf (current-connection) (first (connection-list))))
(change-current-connection (first (connection-list))))
(values))

(defvar *self-connected-port* nil)
Expand Down Expand Up @@ -1153,7 +1153,8 @@
(kill-buffer buffer))
(lem-process:delete-process (connection-process connection))
t)
(remove-and-change-connection connection)))
(remove-and-change-connection connection)
(usocket:socket-close (lem-lisp-mode/swank-protocol::connection-socket connection))))

(define-command slime-quit () ()
(when (self-connection-p (current-connection))
Expand Down

0 comments on commit 6d88ffb

Please sign in to comment.