Change state to JOINED before sending JoinResponse (#674)

* Send room metadata as long as participant is not disconnected

* Change state to JOINED before sending join response
This commit is contained in:
Raja Subramanian authored and GitHub committed 2022-05-09 13:28:56 +05:30
1 parent 081b97142f
commit 16407ea180
3 files changed
+6 -5

No files matched your search

-3
View File
@@ -502,9 +502,6 @@ func (p *ParticipantImpl) HandleOffer(sdp webrtc.SessionDescription) (answer web
}
}
if p.State() == livekit.ParticipantInfo_JOINING {
p.updateState(livekit.ParticipantInfo_JOINED)
}
prometheus.ServiceOperationCounter.WithLabelValues("answer", "success", "").Add(1)
return
+4
View File
@@ -37,6 +37,10 @@ func (p *ParticipantImpl) SendJoinResponse(
iceServers []*livekit.ICEServer,
region string,
) error {
if p.State() == livekit.ParticipantInfo_JOINING {
p.updateState(livekit.ParticipantInfo_JOINED)
}
// send Join response
return p.writeMessage(&livekit.SignalResponse{
Message: &livekit.SignalResponse_Join{