feat(realtime): Move reconnect logic inside module
Move the reconnection logic from w4gd to the supabase/realtime module.
Adds the following options to the supabase realtime module:
-
reconnect_enabled
: Enable the reconnection feature. -
reconnect_max_retries
: Defines the maximum amount of retries allowed when trying to reconnect. -
reconnect_backoff
: Defines the base backoff time between retries. Note: The final backoff will bereconnect_backoff * pow(2, retry)
.
Move the realtime autoconnect logic from W4Client to W4GD, and adds a
disconnect_from_realtime
method to manually disconnect from
realtime (with proper warnings in the documentation).
Better sanitize URL in supabase client, and correctly handle empty URL
in realtime connect_socket
function.
Edited by Fabio Alessandrelli