Arms a lingering close on a request that may still be arriving: call it
before answering, in place of setting Connection: close.
Sets Connection: close, and when the body has not all arrived replaces the
socket's destroySoon() so the answer is followed by a FIN and the rest of
the body is read and discarded, rather than the close becoming a TCP reset
that discards the answer. A request whose body is complete is closed the
ordinary way.
Arms a lingering close on a request that may still be arriving: call it before answering, in place of setting
Connection: close.Sets
Connection: close, and when the body has not all arrived replaces the socket'sdestroySoon()so the answer is followed by a FIN and the rest of the body is read and discarded, rather than the close becoming a TCP reset that discards the answer. A request whose body is complete is closed the ordinary way.