pusher/pusher-js

Changing the retry timeout value once disconnected

Opened this issue · 0 comments

Do you want to request a feature or report a bug?
Request a feature

What is the current behavior?
Setting unavailableTimeout in the options does nothing

What is the expected behavior?
There is a value unavailableTimeout in the options, of which is unclear what it actually does. I was expecting it to allow me to set the retry-timeout time (by default seems to be 15 seconds) but that is not the case. After going deeper in to the code base, it seems there is a default strategy which sets a 15000ms timeout variable.

default_strategy.ts

var timeouts = {
    loop: true,
    timeout: 15000,
    timeoutLimit: 60000
  };

I need a way to be able to put the retry to about 2 seconds at most, it does not seem to be possible currently due to this value being hardcoded in to the default strategy.