[libnice] bug fix pseudo tcp session close not signalled to other peer
klaus.kranz at access-company.com
Thu Oct 30 02:54:20 PDT 2014
Thanks Philip for the confirmation.
Looking forward for the final bug fix
From: Philip Withnall [mailto:philip at tecnocode.co.uk]
Sent: Donnerstag, 30. Oktober 2014 10:15
To: Klaus Kranz
Cc: nice at lists.freedesktop.org
Subject: Re: [libnice] bug fix pseudo tcp session close not signalled to
On Wed, 2014-10-29 at 12:06 +0100, Klaus Kranz wrote:
> when calling nice_agent_remove_stream() a WARNING message can be
> observed “failed to send pseudo-TCP packet from agent as no pair has
> been selected yet”, which originates from agent.c
> This prevents signaling session close to the other peer.
Thanks for reminding me of this. I was aware of the issue before, but could
not make time to implement the necessary fix (see below).
For the moment, I’ve filed a bug so it doesn’t get forgotten, and committed
your suggested change since it does improve things a bit:
> It was found that in component.c component_close() candidates are
> remove before calling pseudo_tcp_socket_close().
> Moving calling pseudo_tcp_socket_close() to the beginning of that
> function solves that issue.
Unfortunately it doesn’t solve the issue, just mitigates it in certain
pseudo-TCP states. pseudo_tcp_socket_close() does not block on completing
the FIN handshake, so moving it further up component_close() means the
handshake is started, but not finished. That’s better than before, but not
The correct fix requires making all that API blocking and asynchronous, so
that at the point ncie_agent_remove_stream_async() completes, we can
guarantee that the pseudo-TCP socket FIN handshake has completed.
More information about the nice