Commit d7a9bd04 authored by Dave Cooper's avatar Dave Cooper

protect ccl from file descriptor error by avoiding client call in ignore-errors in client-test

parent dee1b2e2
......@@ -91,6 +91,7 @@ Perhaps a zombie process is holding port ~a?~%" port port))
(defun client-test (port)
#-ccl
(multiple-value-bind (result error)
(ignore-errors
(glisp:with-timeout (2 (error "AllegroServe port probe timed out on port ~a.
......@@ -98,7 +99,15 @@ Perhaps a zombie process is holding port ~a?~%" port port))
(net.aserve.client:do-http-request (format nil "http://localhost:~a" port))))
(declare (ignore result))
(when (typep error 'error)
port)))
port))
#+ccl
(let* ((result
(handler-case
(let ((sock (usocket:socket-listen "localhost" port)))
(usocket:socket-close sock))
(usocket:address-in-use-error (e) :in-use)
(t (e) :unknown))))
(unless (member result '(:in-use :unknown)) port)))
(defun start-gwl (&key (port *aserve-port*) (listeners *aserve-listeners*)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment