Files
socket.io-client-java/src/main/java/io/socket/backo/Backoff.java
Damien Arrachequesne 0cbf01eb25 fix: ensure randomizationFactor is always between 0 and 1
Using a randomizationFactor value above 1 could lead to generating a
negative duration, then throwing:

> java.lang.IllegalArgumentException: delay < 0: -1012
> at java.util.Timer.schedule(Timer.java:454)
> at io.socket.client.Manager.reconnect(Manager.java:544)

This error does not seem related to a long overflow (in the
BigInteger.longValue() operation), because the BigInteger.min(this.max)
operation before should prevent it.

Related: https://github.com/socketio/socket.io-client-java/issues/349
2022-07-02 09:02:48 +02:00

1.7 KiB