On 20/11/15 17:01, Camille Oudot wrote: > Le Fri, 20 Nov 2015 16:02:26 +0100, > Daniel-Constantin Mierla <mico...@gmail.com> a écrit : > >>> Finally I have removed this line: >>> modparam("usrloc", "close_expired_tcp", 1) >>> >>> It seems it was causing the memory leak. >> Thanks for troubleshooting and pointing to this, I will investigate >> that part of the code and see if I catch any reason for a leak there. > Hi, > > this close_expired_tcp option did not seem to cause any obvious trouble > so far, but I wonder if the code I wrote to force-close the connection > (the worker sends a message via the internal control socket to the main > TCP process) can be replaced with what has been done in the websocket > module's ws_conn.c wsconn_close_now() function, that looks to use only > safe operations. > The side effect if I understand correctly would be to raise a little bit > the TCP socket close delay (max 5 seconds?), but it's definitely worth > it if this method is safer. > although I haven't had the time to dig in the code, I would second the option with safe operations for closing, in this way it follows the typically flow. Also the tm uses the wait timer for last unref, so everything emerges to a single system of destroying the structure.
Cheers, Daniel -- Daniel-Constantin Mierla http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Book: SIP Routing With Kamailio - http://www.asipto.com Kamailio Advanced Training, Nov 30-Dec 2, Berlin - http://asipto.com/kat _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users