You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While using the Audience Service of RouterlicioutClient, we observed that a user remains marked as connected even after being disconnected. For example, when UserA connects to the container, the Audience Service correctly shows UserA as connected along with their details. However, when UserA disconnects, the Audience Service continues to display them as connected to the container in the service response.
To Reproduce
Steps to reproduce the behavior:
call createContainer()
Use the service instance returned by createContainer and call audience.getMembers()
log the data got from getMembers()
Expected behavior
The Audience service should display the exact number of clients. As in the above example, once UserA disconnects, it should show zero clients or an empty map.
Logs
The text was updated successfully, but these errors were encountered:
@neerajcharokar this is expected behavior. To clarify for anyone who comes across this, I confirmed via DMs that the reproduction steps are actually as follows
// This is tehcnically pseudocode, don't expect this to compile as-isconst{ container, services }=azureClient.createContainer();console.log(services.audience.getMembers());// "[client1]"// The following "disconnect" call was left out in the original repro steps,// and this is crucial to understanding why the Audience is not updatingcontainer.disconnect();console.log(services.audience.getMembers());// "[client1]"awaitdelay(10_000);console.log(services.audience.getMembers());// "[client1]"
The reason the Audience stops being updated is that the container instance is disconnected after calling disconnect(). That means it will not receive any new join or leave Ops or Signals.
Opinion
Yes, we could go through the effort of adding Audience service functionality to remove the current user from the audience specifically on disconnect(); however, this would be supporting a very niche, likely unintended use-case. More importantly, even if we removed the current user from their (now offline) Audience service instance immediately on disconnect(), the rest of the Audience information would also have to be considered stale.
Perhaps, instead, to make the experience here more clear, we should instead throw some type of error on audience.getMembers() when the container is disconnected() to make it more clear that the real-time Audience info is not actually available. Alternatively, returning an empty list would probably send the same message.
Describe the bug
While using the Audience Service of RouterlicioutClient, we observed that a user remains marked as connected even after being disconnected. For example, when UserA connects to the container, the Audience Service correctly shows UserA as connected along with their details. However, when UserA disconnects, the Audience Service continues to display them as connected to the container in the service response.
To Reproduce
Steps to reproduce the behavior:
createContainer()
createContainer
and callaudience.getMembers()
getMembers()
Expected behavior
The Audience service should display the exact number of clients. As in the above example, once UserA disconnects, it should show zero clients or an empty map.
Logs
The text was updated successfully, but these errors were encountered: