[nio-cvs] r105 - branches/home/psmith/restructure/src/io

psmith at common-lisp.net psmith at common-lisp.net
Sat Mar 17 18:31:00 UTC 2007


Author: psmith
Date: Sat Mar 17 13:30:59 2007
New Revision: 105

Modified:
   branches/home/psmith/restructure/src/io/nio-server.lisp
Log:
Fix leaking sockets

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	Sat Mar 17 13:30:59 2007
@@ -190,7 +190,9 @@
     (if (connect-inet-socket sock node)
     	(let ((sm (create-state-machine connection-type sock sock node)))
 	  (return-from connect sm))
-  	(format t "Connect failed!!~A ~%" (get-errno)))))
+  	(progn
+	  (format t "Connect failed!!~A ~%" (get-errno))
+	  (close-fd sock)))))
 
 (defun add-connection(node)
   (nio-utils:add +connected-sockets-queue+ node))
\ No newline at end of file



More information about the Nio-cvs mailing list