fix resume/restart with single node mode (#930)

* fix resume/restart with single node mode

* clean comment
This commit is contained in:
cnderrauber
2022-08-18 12:46:18 +08:00
committed by GitHub
parent 05fcca9a04
commit 770076febf
2 changed files with 1 additions and 4 deletions
+1 -1
View File
@@ -576,12 +576,12 @@ func (p *ParticipantImpl) Start() {
}
func (p *ParticipantImpl) Close(sendLeave bool, reason types.ParticipantCloseReason) error {
p.params.Logger.Infow("try close participant", "sendLeave", sendLeave, "reason", reason.String())
if p.isClosed.Swap(true) {
// already closed
return nil
}
p.params.Logger.Infow("closing participant", "sendLeave", sendLeave, "reason", reason.String())
// send leave message
if sendLeave {
_ = p.writeMessage(&livekit.SignalResponse{