Disconnect immediately when server initiated close
This commit is contained in:
@@ -327,6 +327,13 @@ func (p *ParticipantImpl) Close() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// send leave message
|
||||||
|
_ = p.writeMessage(&livekit.SignalResponse{
|
||||||
|
Message: &livekit.SignalResponse_Leave{
|
||||||
|
Leave: &livekit.LeaveRequest{},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
// remove all downtracks
|
// remove all downtracks
|
||||||
p.lock.Lock()
|
p.lock.Lock()
|
||||||
for _, t := range p.publishedTracks {
|
for _, t := range p.publishedTracks {
|
||||||
|
|||||||
Reference in New Issue
Block a user