supabase-swift icon indicating copy to clipboard operation
supabase-swift copied to clipboard

fix(realtime): handle timeout when subscribing to channel

Open grdsdev opened this issue 1 year ago • 0 comments

What kind of change does this PR introduce?

Fix

What is the current behavior?

channel.subscribe() currently doesn't handle timeout, if for some reason channel doesn't receive a reply back, if blocks forever.

What is the new behavior?

  • channel.subscribe() retries the subscription in case of timeout.
  • timeout is configured through Configuration object when initializing client.

Additional context

I'll handle retry limits on a future PR, so it doesn't keep retrying forever.

grdsdev avatar Apr 19 '24 15:04 grdsdev