Hi, Alexander,

I agree with you about "yet another thread".
But sockets are limited resources too.
Now sockets from conn_pool (client part of http library)
_never_ released after use (see conn_pool_put function).

David patch cleans sockets only for server part of http library, and it is good,
but what about sockets at client part?

 From http.c:
/* XXX re-implement socket pools, with idle connection killing to save sockets
*/ - it is about client part.

This means that either with new thread or without, but this part must be
patched too.

I post my patch with goal to remind about the problem.
It is not problem for me to patch sources on my side by myself ;)

And about David's patch:
in function pointer_to_octstr()

+    char *tmp = (char *) gw_malloc(sizeof(char) * 255);
+    sprintf(tmp, "%ld", p);
+    tmp_oct = octstr_create(tmp);
+    gw_free(tmp);

can be changed to use octstr_format()


Alexander Malysh wrote: > Hi Slava, > > I would vote -1 for your patch. I see no need to start "yet another thread" > only to watch timedout connections (threads are limited resources). David's > patch (though only for http-server part) avoid it gracefully... > > David your patch has one problem (what I can see right now): > please add cleanup for appropriate clients into port_remove function; > otherwise callback function will be called for those clients, wich call > port_put function then and we have panic, because port just doesn't exists in > the dictionary anymore. > > On Monday 24 November 2003 13:52, Vjacheslav Chekushin wrote: >

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





Reply via email to