send event when participant disconnects

This commit is contained in:
David Zhao
2020-12-05 17:53:33 -08:00
parent abd17af4d4
commit 71a7914eec
2 changed files with 4 additions and 4 deletions
+2
View File
@@ -108,6 +108,8 @@ func (r *Room) RemoveParticipant(id string) {
if p, ok := r.participants[id]; ok {
// also stop connection if needed
p.Close()
// update clients
r.broadcastParticipantState(p)
}
delete(r.participants, id)