[nio-cvs] r88 - in branches/home/psmith/restructure/src: io nio-logger
psmith at common-lisp.net
psmith at common-lisp.net
Thu Feb 15 23:07:00 UTC 2007
Author: psmith
Date: Thu Feb 15 18:06:59 2007
New Revision: 88
Modified:
branches/home/psmith/restructure/src/io/async-fd.lisp
branches/home/psmith/restructure/src/io/nio-server.lisp
branches/home/psmith/restructure/src/nio-logger/run-logging-client.lisp
Log:
clean up close after error
Modified: branches/home/psmith/restructure/src/io/async-fd.lisp
==============================================================================
--- branches/home/psmith/restructure/src/io/async-fd.lisp (original)
+++ branches/home/psmith/restructure/src/io/async-fd.lisp Thu Feb 15 18:06:59 2007
@@ -94,7 +94,7 @@
(cond
((< new-bytes 0)
(let ((errno (get-errno)))
- (format t "read-error - Errno: ~A~%" errno)
+ (format-log t "async-fd:read-more - read-error, Errno: ~A~%" errno)
(cond ((eql errno +ERRNO_EAGAIN+)
(setf (read-ready state-machine) nil))
(t
Modified: branches/home/psmith/restructure/src/io/nio-server.lisp
==============================================================================
--- branches/home/psmith/restructure/src/io/nio-server.lisp (original)
+++ branches/home/psmith/restructure/src/io/nio-server.lisp Thu Feb 15 18:06:59 2007
@@ -48,19 +48,17 @@
(progn
(when (read-ready async-fd) (read-more async-fd))
(when (> (buffer-position (foreign-read-buffer async-fd)) 0)
- (process-read async-fd)))
- (read-error (re) (push async-fd removals)))
+ (process-read async-fd))
;process-writes
- (handler-case
- (progn
(process-write async-fd)
(when (and (write-ready async-fd)
(> (buffer-position (foreign-write-buffer async-fd)) 0))
(write-more async-fd))
-
+;process normal close
(when (close-pending async-fd)
(write-more async-fd)
(push async-fd removals)))
+ (read-error (re) (push async-fd removals))
(write-error (we) (push async-fd removals))))
client-hash)
(dolist (async-fd removals)
Modified: branches/home/psmith/restructure/src/nio-logger/run-logging-client.lisp
==============================================================================
--- branches/home/psmith/restructure/src/nio-logger/run-logging-client.lisp (original)
+++ branches/home/psmith/restructure/src/nio-logger/run-logging-client.lisp Thu Feb 15 18:06:59 2007
@@ -33,7 +33,6 @@
(let ((log-file (second sb-ext:*posix-argv*))
(ip (third sb-ext:*posix-argv*)))
(format t "Starting logging client with ~A ~A~%" log-file ip)
- (sb-thread:make-thread #'(lambda()(nio:start-server 'nio-yarpc:yarpc-client-state-machine)) :name "nio-server")
; (nio:add-connection (nio:node ip 16323))
; (sleep 60)
@@ -47,6 +46,8 @@
(sb-debug:backtrace 20 out))
(quit)))
+ (sb-thread:make-thread #'(lambda()(nio:start-server 'nio-yarpc:yarpc-client-state-machine)) :name "nio-server")
+
(nio-logger:tail-log log-file ip)
)
More information about the Nio-cvs
mailing list