[cl-irc-cvs] r196 - trunk

ehuelsmann at common-lisp.net ehuelsmann at common-lisp.net
Tue Apr 24 21:51:57 UTC 2007


Author: ehuelsmann
Date: Tue Apr 24 17:51:56 2007
New Revision: 196

Modified:
   trunk/protocol.lisp
Log:
Move connectedp into the dcc-connection section;
 ignore errors when closing a connection.

Modified: trunk/protocol.lisp
==============================================================================
--- trunk/protocol.lisp	(original)
+++ trunk/protocol.lisp	Tue Apr 24 17:51:56 2007
@@ -482,23 +482,22 @@
 
 ;; SEND related generic functions
 ;;<none yet, we don't do SEND yet...>
-
+(defmethod connectedp ((connection dcc-connection))
+  (let ((stream (network-stream connection)))
+    (and (streamp stream)
+         (open-stream-p stream))))
 
 (defmethod dcc-close ((connection dcc-connection))
   #+(and sbcl (not sb-thread))
   (sb-sys:invalidate-descriptor
    (sb-sys:fd-stream-fd (network-stream connection)))
-  (close (network-stream connection))
+  (ignore-errors
+    (close (network-stream connection)))
   (setf (remote-user connection) nil
         *dcc-connections* (remove connection *dcc-connections*)
         (dcc-connections (irc-connection connection))
         (remove connection (dcc-connections (irc-connection connection)))))
 
-(defmethod connectedp ((connection dcc-connection))
-  (let ((stream (network-stream connection)))
-    (and (streamp stream)
-         (open-stream-p stream))))
-
 ;;
 ;; Channel
 ;;



More information about the cl-irc-cvs mailing list