[jitsi-users] ice4j PseudoTCP timeout and StunKeepAliveThread throwing fatal exception


Hi all,

first of all, I'd like to thank you for the amazing work you have done on ice4j.

I'm using ice4j and its PseudoTCP stack to create a connection between two
Android devices. It works great until one end of the connection is killed.

Then a connection timeout occurs which leads to a PseudoTCPBase.closedown().
After that I the following exception :

FATAL EXCEPTION: StunKeepAliveThread
java.lang.IllegalArgumentException: port=-1
  at java.net.InetSocketAddress.<init>(InetSocketAddress.java:71)
  at java.net.DatagramSocket.getLocalSocketAddress(DatagramSocket.java:549)
  at org.ice4j.socket.DelegatingDatagramSocket.getLocalSocketAddress(DelegatingDatagramSocket.java:416)
  at org.ice4j.socket.DelegatingDatagramSocket.getLocalSocketAddress(DelegatingDatagramSocket.java:417)
  at org.ice4j.socket.IceUdpSocketWrapper.getLocalSocketAddress(IceUdpSocketWrapper.java:86)
  at org.ice4j.ice.ConnectivityCheckClient.sendBindingIndicationForPair(ConnectivityCheckClient.java:147)
  at org.ice4j.ice.Agent.runInStunKeepAliveThread(Agent.java:2147)
  at org.ice4j.ice.Agent$StunKeepAliveThread.run(Agent.java:2107)

Is it a normal behavior ?

I think Agent should be freed when PseudoTCP socket is closed but I can't figure out where to do that without modifying PseudoTCP stack.
Input/OutputStream are passed to agnostic classes so it's not relevant to let them free the Agent.

Any idea are welcome !



Paul Fariello