Hi, David.
Current kannel http implementation doesn't free sockets for client->server
part too (I mean conn_pool dictionary).
This part even more important for WAP than server's part of http library.
I've made patch some time ago to clean timeouted connection for this part of
library. It works fine for me.



David Schmitz wrote:
Hi everybody,

attached is a patch that implements a rather naive HTTP-timeout solution.
Problem:
The current http-module will not disconnect clients, thus resources (e.g. sockets) are not reclaimed.
Approach of the solution:
* each new client registers itself in a dictionary of active clients upon creation.
* the server thread checks after a certain timeout each client in the dictionary whether or not the connection has been timed out.
* 2 kinds of timeout are supported:
(1) CONNECTION: the time between creation of the client and the first input.
(2) IDLE: the time between subsequent data transfers.
* clients that are waiting for an answer (e.g. clients in the request_is_being_handled and sending_reply state) are not disconnected.
* each data transfer resets the client's timestamp.
* the configuration of the timeout-values is done in the http.h file, which I know is not a very sane approach.

Please have a look at the patch. If anyone comes up with a better solution or finds errors/mistakes: I am happy to learn :))).

Mit freundlichen Gruessen/Best regards

David Schmitz

Softwareentwicklung



--
Vjacheslav Chekushin                                mailto:[EMAIL PROTECTED]
Latvian Mobile Phone Company                        http://www.lmt.lv

Attachment: conn_pool.patch.gz
Description: GNU Zip compressed data



Reply via email to