supabase / realtime-js

An isomorphic Javascript client for Supabase Realtime server.
https://supabase.com
MIT License
323 stars 58 forks source link

fix: Add Web Workers as a way to run health check #431

Closed filipecabaco closed 1 month ago

filipecabaco commented 1 month ago

What kind of change does this PR introduce?

Adds Web Workers as a way to run heart beat on Realtime to avoid suspending the tab.

netgfx commented 1 month ago

Perhaps the non-worker part of the lib should send a message to alert the worker to stop (and possibly to start again on reconnect). Also curious if the server part is able to cleanup resources effectively if it still receives heartbeat.

w3b6x9 commented 1 week ago

addresses: https://github.com/supabase/realtime-js/issues/121