Commit 7475d49ce4b1322e088e2db14eb43427f80361c5

Thomas de Grivel 2017-08-01T22:31:13

catch conditions in epoll reader cont

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/thot-epoll.lisp b/thot-epoll.lisp
index b8246b8..8d3792c 100644
--- a/thot-epoll.lisp
+++ b/thot-epoll.lisp
@@ -84,7 +84,8 @@
 (defmethod agent-in ((epoll epoll-infos) (worker worker))
   (let ((reader-cont (worker-reader-cont worker)))
     (when reader-cont
-      (let ((result (funcall reader-cont)))
+      (let ((result (handler-case (funcall reader-cont)
+                      (t (condition) (format t "~A~%" condition) :eof))))
         (cond ((eq :eof result) (epoll-del epoll worker))
               ((eq nil result) (setf (worker-reader-cont worker) nil))
               ((eq :keep-alive result) (setf (worker-keep-alive worker) t