Fix minor typos etc

This commit is contained in:
Jaidyn Levesque 2019-11-11 01:08:06 -06:00
parent 8cb6e6e7a8
commit 023c4b7d8a

View File

@ -160,22 +160,22 @@
;; ————————————————— ;; —————————————————
(defgeneric close-it (target con-list on-disconnect) (defgeneric close-it (target &optional con-list on-disconnect)
(:documentation "Shut down a target's connection, forcefully. (:documentation "Shut down a target's connection, forcefully.
Run the disconnect function as well.")) Run the disconnect function as well."))
;; CONNECTION LIST-OF-CONNECTIONS FUNCTION ;; CONNECTION LIST-OF-CONNECTIONS FUNCTION
(defmethod close-it ((con connection) connection-list on-disconnect) (defmethod close-it ((con connection) &optional connection-list on-disconnect)
(close (constream con) connection-list on-disconnect)) (close-it (consocket con) connection-list on-disconnect))
;; STREAM-USOCKET LIST-OF-CONNECTIONS FUNCTION ;; STREAM-USOCKET LIST-OF-CONNECTIONS FUNCTION
(defmethod close-it ((socket usocket:stream-usocket) connection-list on-disconnect) (defmethod close-it ((socket usocket:stream-usocket) &optional connection-list on-disconnect)
(funcall on-disconnect socket connection-list) (when connection-list (funcall on-disconnect socket connection-list))
(handler-case (handler-case
(usocket:socket-close socket) (usocket:socket-close socket)
(error (e) (error (e)
(logger "Ignoring the error from closing connection: ~a" e))) (logger "Ignoring the error from closing connection: ~a" e)))
(logger "Connection closed: ~A" con)) (logger "Connection closed: ~A" socket))
;; ————————————————— ;; —————————————————