Fix fd exhaustion if the connection is closed prematurely
If the handling thread does not reach process-connection, the socket stream will never be closed and hunchentoot will eventually run out of available file descriptors: 1. If the connection is refused by the server (i.e. too-many-taskmaster-requests is called), send-service-unavailable-reply doesn't close the socket stream. 2. If the connection is closed by the client before the handling thread is spawned, the error handler in create-request-handler-thread does not close the stream socket. Moreover, in the case of an HTTPS request, if the client drops the connection before the SSL stream is fully initialized (or if the SSL initialization fails), *hunchentoot-stream* in process-connection will not have been bound and the socket stream will not be closed.
parent
3013b22f
Please register or sign in to comment