[sr-dev] patch porposal for usrloc: close TCP connections

Vitaliy Aleksandrov vitalik.voip at gmail.com
Mon Mar 23 16:31:33 CET 2015


Hi,

I have a feeling that this patch creates a big opportunity for closing 
wrong connections.
Lets imagine the situation when you have a contact with the tcpconn_id=X 
and this contact wasn't refreshed by a UA in time. When proposed option 
is enabled kamailio will close a connection with ID = X at the next 
timer run. But we have no guarantee that ID = X is still identifies 
connection we want to close because this connection could be closed 
before timer run and then its ID reused by another client.

> Hi,
>
> I want to propose a patch to usrloc:
>
> https://github.com/kamailio/kamailio/commit/14852a98ed46b7a88c92bff31c319d26b6410efb
>
> this patch adds a new parameter, close_expired_tcp, that makes usrloc
> request the main TCP process to end the connections of expired
> registrations (assuming 1 connection = 1 contact).
>
> It enables to release resources on the system ASAP, in the event of a
> lost connection (e.g. when clients are on mobile networks).
>
> Any thoughts?
>
> Cheers,
>




More information about the sr-dev mailing list