Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit removes the limit on WebSocket failures. Previously, the code set a maximum number of failures before falling back to other transports and using them for all subsequent re-connections. The purpose of this limit was to improve re-connection time for clients experiencing repeated issues with WebSocket transport. However, it is now believed that this limit is unnecessary. Today, the occurrence of such issues is less common, and the limit may have unintended consequences. For example, in the current approach, a modern web browser with a temporary bad internet connection could exhaust its chances to use WebSocket and be left with slower fallbacks for the remainder of the session. By removing this limit, we enable indefinite retries for WebSocket. This behavior is extensively explained in the following blog posts. https://pusher.com/blog/how-we-built-pusher20-part-1/ https://pusher.com/blog/how-we-built-pusher-js-2-0-part-2-implementation/ https://pusher.com/blog/how-we-built-pusher-js-2-0-part-3-metrics/
- Loading branch information