
18 Feb
2010
18 Feb
'10
10:53 a.m.
Excerpts from Bardur Arantsson's message of Wed Feb 17 21:27:07 +0200 2010:
For sendfile, a timeout of 1 second would probably be fine. The *ONLY* purpose of threadWaitWrite in the sendfile code is to avoid busy-waiting on EAGAIN from the native sendfile.
Of course this will kill connections for all clients that may have a two second network hickup.
How so? As a user I expect sendfile to work and not semi-randomly block threads indefinitely.
If you want sending something to terminate you will add a timeout to it. A nasty client may e.g. take one byte each minute and sending your file may take a few years. - Taru Karttunen