
5 Jun
2007
5 Jun
'07
3:07 p.m.
Author: ehuelsmann Date: Tue Jun 5 11:07:16 2007 New Revision: 258 Modified: usocket/trunk/usocket.lisp Log: Fix crash where resolution leads to 'no data'. Return NIL instead. Modified: usocket/trunk/usocket.lisp ============================================================================== --- usocket/trunk/usocket.lisp (original) +++ usocket/trunk/usocket.lisp Tue Jun 5 11:07:16 2007 @@ -296,7 +296,8 @@ (defun get-random-host-by-name (name) (let ((hosts (get-hosts-by-name name))) - (elt hosts (random (length hosts))))) + (when hosts + (elt hosts (random (length hosts)))))) (defun host-to-vector-quad (host) "Translate a host specification (vector quad, dotted quad or domain name)