Skip to content

Commit

Permalink
fix: Incorrect spelling of "offerer" in peer (#154)
Browse files Browse the repository at this point in the history
馃う馃う馃う馃う馃う
  • Loading branch information
kylecarbs committed Feb 3, 2022
1 parent d76737b commit 35dd208
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions peer/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func newWithClientOrServer(servers []webrtc.ICEServer, client bool, opts *ConnOp
pingEchoChannelID: 2,
opts: opts,
rtc: rtc,
offerrer: client,
offerer: client,
closed: make(chan struct{}),
closedRTC: make(chan struct{}),
closedICE: make(chan struct{}),
Expand Down Expand Up @@ -103,7 +103,7 @@ type Conn struct {
rtc *webrtc.PeerConnection
opts *ConnOptions
// Determines whether this connection will send the offer or the answer.
offerrer bool
offerer bool

closed chan struct{}
closedRTC chan struct{}
Expand Down Expand Up @@ -273,7 +273,7 @@ func (c *Conn) negotiate() {
c.hasNegotiated = true
defer c.negotiateMutex.Unlock()

if c.offerrer {
if c.offerer {
offer, err := c.rtc.CreateOffer(&webrtc.OfferOptions{})
if err != nil {
_ = c.CloseWithError(xerrors.Errorf("create offer: %w", err))
Expand Down Expand Up @@ -312,7 +312,7 @@ func (c *Conn) negotiate() {
return
}

if !c.offerrer {
if !c.offerer {
answer, err := c.rtc.CreateAnswer(&webrtc.AnswerOptions{})
if err != nil {
_ = c.CloseWithError(xerrors.Errorf("create answer: %w", err))
Expand Down

0 comments on commit 35dd208

Please sign in to comment.