ice4j icon indicating copy to clipboard operation
ice4j copied to clipboard

TURN connection loss after 10 minutes

Open Jeyhey opened this issue 8 years ago • 4 comments

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?

Jeyhey avatar Aug 26 '16 15:08 Jeyhey

Did you find a solution to this problem?

Geosearchef avatar Oct 02 '18 18:10 Geosearchef

Tracing #199

dingdongnigetou avatar Apr 09 '20 04:04 dingdongnigetou

Did you find a solution to this problem?

No, I switched to WebRTC : )

Jeyhey avatar Jul 14 '20 10:07 Jeyhey

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

Geosearchef avatar Jul 20 '20 11:07 Geosearchef