Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
handle-condition was incorrect for CLISP. As a result, there were all…
… sorts of socket errors when a remote client closed a connection or we (the server) timed out a socket that we were also blocked reading on. I've fixed this for Mac and Linux, for CLISP 2.49 and 2.49+ (2010-07-17). So it should continue to work for future versions of CLISP. I don't have access to Windows, so I don't know if it will work there. I also don't know if it used to work there before my change. I haven't tested this on client sockets. ---- test set up ;hunchentoot is listening on localhost:8000, like this: (ql:quickload "hunchentoot") (use-package "HUNCHENTOOT") (setf *default-connection-timeout* 5) ;seconds (define-easy-handler (h1 :uri "/h1") () (setf (content-type*) "text/plain") "hallo") (defparameter *acc* (make-instance 'easy-acceptor :port 8000)) (start *acc*) test 1 nc localhost 8000 followed immediately by Ctrl-C clisp should print nothing test 2 nc localhost 8000 followed by a 5 second wait should make netcat end clisp should print nothing test 3 echo -e 'GET /h1 HTTP/1.0\r\n\r\n' | nc localhost 8000 should print "hallo" clisp should only print one line showing that the http request was handled test4 mac: echo | nc localhost 8000 linux: echo | nc -q 1 localhost 8000 clisp should print nothing ---- - = none fail blank = untested failing-tests mac linux-2.49 rpi-2.49+-2010-07-17 clisp - - - sbcl - - ccl - - sbcl my *default-connection-timeout* hunchentoot setting doesn't seem to take effect. netcat times out in 20 seconds, not 5. this is on both mac and linux
- Loading branch information