pjsip_transport_shutdown() doesn't destroy a TCP transport

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/26/08, Helmut Wolf <HelmutWolf1 at gmx.de> wrote:
> Hi Benny,
>
>  Thank you for the quick answer. Now it works fine.
>
>  I have found another problem with TCP connections: When a pjsip client connects to a pjsip server using TCP and the client get
>  exited, then the TCP connection is shutdowned and destroyed (because of pjsip_endpt_destroy) but the server does only shutdown the
>  pjsip transport, not destroy. After the client is down, the tcp socket in the server application changes to state CLOSE_WAIT and
>  nothing happens. When I shutdown the server (where pjsip_endpt_destroy is called and herewith the transport will be destroyed) then
>  I got logging from pjsip: TCP transport destroyed with reason 130057: Socket is not connected (WSAENOTCONN).
>
>  I think the problem is in pjsip_transport_shutdown(): The function is described that the transport will be destroyed if no object is
>  using the transport. Debugging this function shows that the reference counter is 0, but I haven't found code in this (and the
>  underlying) function where destroy- functions are called...
>

When the transport reference counter reaches zero, it will not be
destroyed immediately, but rather an idle timer will get started,
which will expire in PJSIP_TRANSPORT_IDLE_TIME seconds (default is 600
seconds). Only after this time, when no object is requesting this
transport, the transport gets destroyed.

cheers,
 -benny



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux