From 023c4b7d8ac5624b5af0b7943a393534fd0fb897 Mon Sep 17 00:00:00 2001 From: Jaidyn Levesque Date: Mon, 11 Nov 2019 01:08:06 -0600 Subject: [PATCH] Fix minor typos etc --- facilservil.lisp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/facilservil.lisp b/facilservil.lisp index f818524..642d2b6 100644 --- a/facilservil.lisp +++ b/facilservil.lisp @@ -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. Run the disconnect function as well.")) ;; CONNECTION LIST-OF-CONNECTIONS FUNCTION -(defmethod close-it ((con connection) connection-list on-disconnect) - (close (con→stream con) connection-list on-disconnect)) +(defmethod close-it ((con connection) &optional connection-list on-disconnect) + (close-it (con→socket con) connection-list on-disconnect)) ;; STREAM-USOCKET LIST-OF-CONNECTIONS FUNCTION -(defmethod close-it ((socket usocket:stream-usocket) connection-list on-disconnect) - (funcall on-disconnect socket connection-list) +(defmethod close-it ((socket usocket:stream-usocket) &optional connection-list on-disconnect) + (when connection-list (funcall on-disconnect socket connection-list)) (handler-case (usocket:socket-close socket) (error (e) (logger "Ignoring the error from closing connection: ~a" e))) - (logger "Connection closed: ~A" con)) + (logger "Connection closed: ~A" socket)) ;; —————————————————