Update of /project/cl-irc/cvsroot/cl-irc In directory common-lisp:/tmp/cvs-serv28092
Modified Files: protocol.lisp Log Message: Satisfy read-message-loop assumption of read-message NIL return on eof.
--- /project/cl-irc/cvsroot/cl-irc/protocol.lisp 2006/01/27 21:10:02 1.31 +++ /project/cl-irc/cvsroot/cl-irc/protocol.lisp 2006/01/30 19:51:12 1.32 @@ -1,4 +1,4 @@ -;;;; $Id: protocol.lisp,v 1.31 2006/01/27 21:10:02 ehuelsmann Exp $ +;;;; $Id: protocol.lisp,v 1.32 2006/01/30 19:51:12 ehuelsmann Exp $ ;;;; $Source: /project/cl-irc/cvsroot/cl-irc/protocol.lisp,v $
;;;; See LICENSE for licensing information. @@ -244,7 +244,8 @@ (let ((message (read-irc-message connection))) (when *debug-p* (format *debug-stream* "~A" (describe message))) - (irc-message-event connection message) + (when message + (irc-message-event connection message)) message))) ; needed because of the "loop while" in read-message-loop
(defvar *process-count* 0) @@ -293,10 +294,13 @@
(defmethod read-irc-message ((connection connection)) "Read and parse an IRC-message from the `connection'." - (let ((message (create-irc-message - (read-line (network-stream connection) t)))) - (setf (connection message) connection) - message)) + (handler-case + (let ((message (create-irc-message + (read-line (network-stream connection) t)))) + (setf (connection message) connection) + message) + (end-of-file))) + ;; satisfy read-message-loop assumption of nil when no more messages
(defmethod send-irc-message ((connection connection) command &optional trailing-argument &rest arguments)