[libnice] Detecting the peer has disconnected

Curieux Tres trescurieux at yahoo.fr
Wed Apr 22 08:40:24 PDT 2015


Hi,I have 2 instances of libnice talking to each other nicelyBut when one of the instance is killed, the other one is not notified and retries forever to send data.What would be the right way to get that "peer is gone" information ?I've hooked all the signals but they are not invoked in that case (might have made a mistake there).
For test purpose,  i have added a check in pseudo_tcp_notify_clock (see below)and it seems to do the worki.e. if we have some tx stuff going on and the last received packed is more than 30s old, it means we have a problem.There is probably a better way to do that
ThanksBest Regards


{...if (priv->snd_wnd ){      if (time_diff(now, priv->lastrecv) >= 30000)       {        closedown (self, ECONNABORTED, CLOSEDOWN_LOCAL);        return;      }}..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/nice/attachments/20150422/34756865/attachment.html>


More information about the nice mailing list