Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Close socket gracefully when `slime-quit'
  • Loading branch information
kchanqvq committed May 16, 2023
commit a171cb00a9c9c1f438ded17d36cb888a61681efc
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