Re: [PATCH] Naive approach to HTTP-timeouts
"David Schmitz" <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Slava,
argh, correct. An IMO easy solution is to call check_timeout even if the
recent poll did not timeout, as in:
[snip]
if ((ret = gwthread_poll(tab, n, MIN_TIME_OUT)) < 1) {
switch(ret) {
case 0: /* timeout */
break;
case -1: /* error */
if (errno != EINTR) /* a signal was caught during poll()
function */
warning(0, "HTTP: gwthread_poll failed.");
continue;
break;
default: /* should not happen */
panic(0, "This is not supposed to happen!");
}
}
check_timeout();
[snap]
That should take care of loaded environments...
Regards,
David
Vjacheslav Chekushin schrieb:
> Hi, David.
>
> If I understand correctly then check_timeouts() will be called only if
> no any new connection to kannel http server for MIN_TIME_OUT time.
> So for busy enviroment this check will be quite undeterminate and can
> be not called for hours. Isn't it?
>
> David Schmitz wrote:
>
>> Hi again,
>>
>> attached is the new patch for HTTP-timeouts. I have included the work
>> of Slava wrt. server-timeouts, but modified it such that no new
>> thread is needed. Another new thing is the purging of active clients
>> upon port-removal, as suggested by Alex.
>>
>> Please, try it out and share your comments :)
>>
>> Best regards,
>> David
>>
>
--
Mit freundlichen Gruessen/Best regards
David Schmitz
Softwareentwicklung
-----------------------------------------------------------------
Wapme Systems AG
Vogelsanger Weg 80
40470 Düsseldorf
Tel.: + 49 -211-7 48 45 - 2708
Fax: + 49 -211-80-6-06-2801
E-Mail: [email protected]
Internet: http://www.wapme-systems.de