Menu

#63 recv() timeout fix (patch enclosed)

open
nobody
check_http (12)
5
2001-02-26
2001-02-26
No

I have a server that never closes its socket; it
always relies on the client to initiate the close.
the check_http plugin always relies on the server
to initiate the close (it calls recv() in a loop
until it gets an error). The recv() function will
block indefinitely waiting for input.

Simple fix is to pay attention to the Content-Length
header and stop reading when that many bytes have
been received (after the header).

Context unified diff attached.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB