This message was deleted.
# helpdesk
s
This message was deleted.
d
are you initiating the disconnect from the same instance? Or is the disconnect triggered by the server? I'm not sure if we would be firing the disconnect callback if it was initiated locally. CC: @polite-kilobyte-67570
s
I am calling
onDisconnected
from client side:
Copy code
<LiveKitRoom
          room={room}
          token={token}
          serverUrl={env.NEXT_PUBLIC_LIVEKIT_SERVER_URL}
          connect={isConnectionToggled}
          onConnected={() => {
            setIsConnected(true);
            setIsProgressBarDisplayed(false);
            setIsPreview(false);
          }}
          onDisconnected={() => setIsConnected(false)}
          audio={true}
          video={true}
          screen={false}
          style={{ width: "100%" }}
        >
          <Studio />
        </LiveKitRoom>
@dry-elephant-14928
d
I think that's just calling your callback directly? To trigger a disconnect, you should use
room.disconnect()
s
Oh I see, I will try thanks
working thanks !
🙌 2