Revision: 4198 Author: hans URL: http://bknr.net/trac/changeset/4198
guard against closed sockets (from ITA r235337) U trunk/thirdparty/hunchentoot/connection-manager.lisp
Modified: trunk/thirdparty/hunchentoot/connection-manager.lisp =================================================================== --- trunk/thirdparty/hunchentoot/connection-manager.lisp 2009-02-09 10:46:38 UTC (rev 4197) +++ trunk/thirdparty/hunchentoot/connection-manager.lisp 2009-02-09 10:47:35 UTC (rev 4198) @@ -127,10 +127,16 @@ nil #'process-connection (server manager) handle))
+(defun client-as-string (socket) + (let ((address (usocket:get-peer-address socket)) + (port (usocket:get-peer-port socket))) + (when (and address port) + (format nil "~A:~A" + (usocket:vector-quad-to-dotted-quad address) + port)))) + #-:lispworks (defmethod handle-incoming-connection ((manager one-thread-per-connection-manager) socket) (bt:make-thread (lambda () (process-connection (server manager) socket)) - :name (format nil "Hunchentoot worker (client: ~A:~A)" - (usocket:vector-quad-to-dotted-quad (usocket:get-peer-address socket)) - (usocket:get-peer-port socket)))) + :name (format nil "Hunchentoot worker (client: ~A)" (client-as-string socket))))