| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| // Received error codes 4000 >= 4099 indicate we shouldn't attempt reconnection | ||
| // https://pusher.com/docs/pusher_protocol#error-codes | ||
| private boolean shouldReconnect(int code) { | ||
| return !(code >= 4000 && code <= 4099); |
There was a problem hiding this comment.
I'd personally find this easier to read without the negative, i.e. code < 4000 || code >= 4100, but it's not a big deal.
Sorry, something went wrong.
| }, reconnectInterval, TimeUnit.SECONDS); | ||
| } | ||
|
|
||
| // Received error codes 4000 >= 4099 indicate we shouldn't attempt reconnection |
There was a problem hiding this comment.
I'm not clear what 4000 >= 4099 precisely means. What about the notation the docs use 4000-4099?
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description of the pull request
Currently, the library ignores Pusher codes and therefore attempts reconnections. I have a feeling this will cause issues with future feature work we may do, so here's a fix.
Why is the change necessary?
Respecting protocol.
CC @pusher/mobile