From: Fredrik Tolf Date: Mon, 5 Apr 2010 05:08:35 +0000 (+0200) Subject: Make sure always to close the mpcl socket stream properly. X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=b84cd587ccd8be0f7660628e8137aa497ecfae87;p=lisp-utils.git Make sure always to close the mpcl socket stream properly. --- diff --git a/mpcl.lisp b/mpcl.lisp index 98a545e..de3e410 100644 --- a/mpcl.lisp +++ b/mpcl.lisp @@ -153,7 +153,9 @@ "Disconnect from MPD." (with-conn-lock (let ((sk (prog1 *socket* (setf *socket* nil)))) - (if sk (ignore-errors (close sk)))))) + (when sk (handler-case + (close sk) + (error () (close sk :abort t))))))) (defun connection-error (condition-type &rest condition-args) (disconnect)