a query related to firebase presence app using javascript sdk. I have seen that there is 60 seconds buffer after the inte.net is disconnected after which the entries are removed from the firebase real tim edatabase. Is it possible to configure this time from 60 seconds to lets say 30 seconds? . I basically want the entries to be removed from the presence as soon as the inte.net is disconnected. If not immediately then at least sooner than a minute alteast.Does anybody have any idea on this?
There are two ways an onDisconnect
handler can be triggered on the Firebase servers:
onDisconnect
handlers immediately.onDisconnect
handlers.Detecting the dirty disconnects takes some times (upwards to a few minutes) and there's no way for you to configure it.
If you want more granular presence detection, the common approach is to periodically write a timestamp into the database from the client. This indicates when the client was last active, and can be used by the other clients to then indicate the liveliness of that user/client.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.