IllegalArgumentException: delay < 0
Hi! When client tries to reconnect sometimes crashes:
24999-25383/com.wax.app E/AndroidRuntime﹕ FATAL EXCEPTION: EventThread
Process: com.wax.app, PID: 24999
java.lang.IllegalArgumentException: delay < 0: -4935945193745547264
at java.util.Timer.schedule(Timer.java:457)
at com.github.nkzawa.socketio.client.Manager.reconnect(Manager.java:497)
at com.github.nkzawa.socketio.client.Manager.access$2000(Manager.java:20)
at com.github.nkzawa.socketio.client.Manager$8$1$1.call(Manager.java:519)
at com.github.nkzawa.socketio.client.Manager$1$3.call(Manager.java:282)
at com.github.nkzawa.emitter.Emitter.emit(Emitter.java:117)
at com.github.nkzawa.engineio.client.Socket.onError(Socket.java:754)
at com.github.nkzawa.engineio.client.Socket.access$800(Socket.java:29)
at com.github.nkzawa.engineio.client.Socket$4.call(Socket.java:293)
at com.github.nkzawa.emitter.Emitter.emit(Emitter.java:117)
at com.github.nkzawa.engineio.client.Transport.onError(Transport.java:63)
at com.github.nkzawa.engineio.client.transports.PollingXHR.access$100(PollingXHR.java:19)
at com.github.nkzawa.engineio.client.transports.PollingXHR$6$1.run(PollingXHR.java:126)
at com.github.nkzawa.thread.EventThread$2.run(EventThread.java:75)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
I also changed the reconnection delay
mSocket.io().reconnectionDelay(1500);
Hello, Having same problem too. Setting reconnection delay doesn't change anything. It started to crash after this commit 8a4ffe95c5ae0d81beef37a3a2626554a24d8cd1
I saw the same issue today. Was wondering what could have caused it.
I'm seeing the same problem. When my device is completely disconnected from the server it is trying to connect to, I'm logging the delay variable from Manager.java and it logs consistently at 5000 and then suddenly jumps to -432345562080083968 and the app crashes.
Thanks for your report! This will be fixed on the next release.
Fixed on 0.4.2. Thanks again.
I have the same issue using v 0.8.1
Please fix it by changing Backoff class: From this: return ms.min(BigInteger.valueOf(this.max)).longValue(); To this: long duration = ms.min(BigInteger.valueOf(this.max)).longValue(); return duration > 0 ? duration : SOME_DEFAULT_VALUE;
Hi. I got same issue when reconnect socket when no internet connection. Please give me some advices. Thank you