It's supposed to be called when the channel is disconnected (I know, right?).

Typically this will be the browser session ending (window close or navigate 
away), but also the client disconnecting using the js api.

Disconnected and connected aren't actually called from the client, they're 
basically webhooks from the channel infrastructure, they seem pretty reliable.

If disconnected gets called, I would take that as the channel token is no 
longer valid, so even if the client is still there it should create a new 
channel. Make sure you put an exponential backoff on that operation, a simple 
bug there can overwhelm your servers with even a small number of js clients.

You probably know channels were  recently deprecated, so if you're just 
starting now it might be better to turn to firebase or a saas alternative.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/ff54359a-e7da-496d-82e3-c9d3c8d8d0aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to