Skip to content

Commit dde2c20

Browse files
fix: pass through correct disconnect reason (#367)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 5d9ffb3 commit dde2c20

File tree

5 files changed

+136
-123
lines changed

5 files changed

+136
-123
lines changed

examples/publish_hue.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ async def main(room: rtc.Room):
2727
)
2828
.to_jwt()
2929
)
30+
31+
@room.on("participant_disconnected")
32+
def on_participant_disconnected(participant: rtc.Participant):
33+
logging.info(
34+
f"participant {participant.identity} disconnected, reason: {rtc.DisconnectReason.Name(participant.disconnect_reason)}"
35+
)
36+
3037
url = os.getenv("LIVEKIT_URL")
3138
logging.info("connecting to %s", url)
3239
try:

0 commit comments

Comments
 (0)