Skip to content
Commit cae0b8ed authored by Mathieu Lemoine's avatar Mathieu Lemoine
Browse files

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
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