ably-forks / laravel-echo

Laravel Echo library for beautiful Pusher and Ably integration.
https://laravel.com/docs/broadcasting#client-side-installation
MIT License
12 stars 4 forks source link

Fix calling undefined errCallback, and fallback to original attach method #30

Closed ryzr closed 10 months ago

ryzr commented 10 months ago

Fixed https://github.com/ably-forks/laravel-echo/issues/29

In the core Ably js client, there are cases where the attach method is called without an errCallback. With the proposed fix, we'll check if an errCallback has been passed, and if not, defer to the original attach method, which will perform some logging. At this point in time, I couldn't see any cases where _attach is called with forceReattach = true and errCallback = undefined, so we should end here:

https://github.com/ably/ably-js/blob/fdd5a566eafac0a7fae9592f890361a608794487/src/common/lib/client/realtimechannel.ts#L342-L346C6

sacOO7 commented 10 months ago

Seems we need to fix this properly, so I opened a new PR https://github.com/ably-forks/laravel-echo/pull/31