socketio / engine.io-client-java

Engine.IO Client Library for Java
http://socketio.github.io/engine.io-client-java
Other
360 stars 167 forks source link

Android connection close every double 'pingInterval' seconds #72

Closed tankcong closed 7 years ago

tankcong commented 8 years ago

Hello, I just found this strange problem, my connection receive EVENT_CLOSE every "pingTimeout" time.
For example, server response:

97:0{"sid":"WWJHwp-pcvQh_7bdAE3t","upgrades":["websocket"],"pingInterval":25000,"pingTimeout":60000}

pingInterval is 25s, then my app receives EVENT CLOSE at 50th seconds. logs:

16:11:40.663 W/System.out: EVENT OPEN 16:12:05.671 I/System.out: ping 16:12:05.730 I/System.out: pong 16:12:30.748 W/System.err: EVENT CLOSE 16:12:35.889 W/System.out: EVENT OPEN 16:13:00.909 I/System.out: ping 16:13:00.960 I/System.out: pong 16:13:25.936 W/System.err: EVENT CLOSE 16:13:31.079 W/System.out: EVENT OPEN 16:13:56.102 I/System.out: ping 16:13:56.162 I/System.out: pong 16:14:21.143 W/System.err: EVENT CLOSE

Seems like ping/pong didn't keep TCP alive. The version of my library is the latest "0.8.1".