Giter Club home page Giter Club logo

Comments (11)

atbe avatar atbe commented on May 22, 2024

Here's a view into redis for the room, all but 1 of these participants is still connected (the windows where these connections originated have already closed)

image

from livekit.

atbe avatar atbe commented on May 22, 2024

And the room object returned by the connect call reports a participants property of size 926

from livekit.

atbe avatar atbe commented on May 22, 2024

I even restarted the machine where the connections originated and they're still there

from livekit.

davidzhao avatar davidzhao commented on May 22, 2024

Abe, this is working by design. These redis values are private to LiveKit internals and you should not depend on them as any indication of the client being present. The values clear out after 24h.

To get room state, please call listRoom/listParticipant APIs on RoomService

from livekit.

atbe avatar atbe commented on May 22, 2024

So I shouldn't be using this https://github.com/livekit/client-sdk-js/blob/main/src/room/Room.ts#L39 to list participants in a call? When I check that property, it includes all those participants that already disconnected

from livekit.

davidzhao avatar davidzhao commented on May 22, 2024

yes, that property should not contain participants that have disconnected.. that may very well be a bug. In this ticket though, you are describing redis state, which is not how that field gets populated.

from livekit.

atbe avatar atbe commented on May 22, 2024

yeah, I was outlining the issue on the server side as a way to provide some insight into why that property might include disconnected participants, but to your point its not relevant to how that field is populated

from livekit.

davidzhao avatar davidzhao commented on May 22, 2024

are you seeing room participants not clearing? hmm I can't seem to reproduce that. Let me know how I might be able to reproduce this.

Do you have logs showing participantDisconnected?

from livekit.

atbe avatar atbe commented on May 22, 2024

Right, the room has participants that wont clear.

You can try to join the room that has dead participants in it here https://livespot.co/session/c9e77293-f854-473c-b7cb-ca101743eb01

Eventually the connection will succeed, it takes a long time to connect after a bunch of retries since we updated to the latest version but that might be a different bug.

If you look at the response from the join message, there are tons of participants getting return that are most definitely not connected

image

from livekit.

davidzhao avatar davidzhao commented on May 22, 2024

I see, that's definitely not right if the participants are no longer around:

  1. how are these participants connecting? are these actual livekit clients? or bots?
  2. how did you trigger a disconnect?

from livekit.

atbe avatar atbe commented on May 22, 2024
  1. Almost all of those are actual clients. Some of them are "logged out users" which just means someone who hasn't logged into livespot but wants to stream a call. We generate a random identity value for them
  2. Disconnects are not always explicitly handled because some people click leave call, and some people just close their window. If they close their window (or refresh), we try to call unpublishTracks on any tracks they're publishing and move on.

I don't think there's an explicit disconnect method on the js client.

from livekit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.