ice4j
ice4j copied to clipboard
TURN connection loss after 10 minutes
When establishing the connection between two android phones via relay server (TURN), I observe that the connection is always lost after 10 minutes with SocketTimeoutException.
In know that the default lifetime of the relay connection is 10 minutes according to RFC5766 (https://tools.ietf.org/html/rfc5766 page 8). According to this specification the client sends refresh requests to the TURN server to keep the connection from getting closed.
Can it be that ice4j does not send these refresh messages to the server? Do I have to configure the Agent for that. Or what am I potentially doing wrong?
Did you find a solution to this problem?
Tracing #199
Did you find a solution to this problem?
No, I switched to WebRTC : )
Did you find a solution to this problem?
No, I switched to WebRTC : )
Switching to WebRTC wasn't an option for us as we're sending lots of packets at a size of 20 bytes and the DTLS enforced by WebRTC causes bandwidth to double.
Our solution was to manually call the refreshRequest function using reflection. This is quite hacky, but it works flawlessly for our purpose: https://github.com/FAForever/java-ice-adapter/blob/master/ice-adapter/src/main/java/com/faforever/iceadapter/ice/PeerTurnRefreshModule.java#L70