[libnice] Reliable communication hanging?

Francesco Massei fmassei at gmail.com
Tue Jun 10 08:51:39 PDT 2014


I'm facing a strange issue with libnice that maybe you can help me solve.

I have two peers that, using a reliable agent
(nice_agent_new_reliable()), communicate between themselves. The first
(let's call him "A") sends some data using nice_agent_send() on each
transport_writable signal, the second (let's call him "B") receives
the data in the callback set with nice_agent_attach_recv().
"A" always manages to send all the data, while "B", for some reason,
receives only part of it: sometimes just the initial frames, sometimes
nearly all of them, but it never manages to get them all.
Right now I'm making tests running both A and B on the same machine,
with a packet sniffer open, and:
- "A" and "B" are both up and running, as I see they keep sending STUN
messages to each other every now and then.
- All the packets "A" sends are on the wire
- If I try to send much more data from "A" (like streaming endlessly
gibberish) eventually "B" will get everything
- Waiting for a long time (even minutes) doesn't help

The only hypothesis I can advance is that, for some reason, B waits
some kind of ACK or SYN that will never arrive as long as A is not
sending anything.

Any idea on why is this happening and how could I solve it?

Thank you very much!

More information about the nice mailing list