Skip to content

Commit cd65c4a

Browse files
peer: use sdpAnswer from crateAnswer
Instead of calling `LocalDescription()` to get it again. It does not seem to make any difference in our particular case?
1 parent b8850c2 commit cd65c4a

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

pkg/peer/peer.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,5 @@ func (p *Peer[ID]) ProcessSDPOffer(sdpOffer string) (*webrtc.SessionDescription,
190190
return nil, ErrCantSetLocalDescription
191191
}
192192

193-
sdpAnswer := p.peerConnection.LocalDescription()
194-
if sdpAnswer == nil {
195-
p.logger.WithError(err).Error("could not generate a local description")
196-
return nil, ErrCantCreateLocalDescription
197-
}
198-
199-
return sdpAnswer, nil
193+
return &answer, nil
200194
}

0 commit comments

Comments
 (0)