1998-05-22
1998-05-22 01:51:31 by David Hedbor <david@hedbor.org>
-
3d5e91d131320a4a5354522d4eea26203fe1a427
(11 lines)
(+6/-5)
[
Show
| Annotate
]
Branch: 5.2
Fixed a bug that made connections which didn't send any data not time out.
Rev: CHANGES:1.116
Rev: server/protocols/http.pike:1.103
6: Inside #if defined(MAGIC_ERROR)
#ifdef MAGIC_ERROR
inherit "highlight_pike";
#endif
- constant cvs_version = "$Id: http.pike,v 1.102 1998/05/21 23:25:38 grubba Exp $";
+ constant cvs_version = "$Id: http.pike,v 1.103 1998/05/22 01:51:31 neotron Exp $";
// HTTP protocol module.
#include <config.h>
private inherit "roxenlib";
634:
static void do_timeout()
{
- #ifdef DEBUG
- werror("do_timeout() called, time="+time+"; time()="+_time()+"\n");
- #endif /* DEBUG */
+ // werror("do_timeout() called, time="+time+"; time()="+_time()+"\n");
int elapsed = _time()-time;
if(time && elapsed >= 30)
{
1172:
remove_call_out(do_timeout);
call_out(do_timeout, 30); // Close down if we don't get more data
// within 30 seconds. Should be more than enough.
- time = _time(1);
+ time = _time(1); // Check is made towards this to make sure the object
+ // is not killed prematurely.
if(wanted_data)
{
if(strlen(s)+have_data < wanted_data)
1290:
my_fd->set_read_callback(got_data);
// No need to wait more than 30 seconds to get more data.
call_out(do_timeout, 30);
+ time = _time(1);
}
}