mirror of
https://github.com/livekit/livekit.git
synced 2026-08-29 05:29:32 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user