@@ -264,6 +264,7 @@ func (c *Conn) negotiate() {
264
264
_ = c .CloseWithError (xerrors .Errorf ("create offer: %w" , err ))
265
265
return
266
266
}
267
+ c .opts .Logger .Debug (context .Background (), "setting local description" )
267
268
err = c .rtc .SetLocalDescription (offer )
268
269
if err != nil {
269
270
_ = c .CloseWithError (xerrors .Errorf ("set local description: %w" , err ))
@@ -283,6 +284,7 @@ func (c *Conn) negotiate() {
283
284
case remoteDescription = <- c .remoteSessionDescriptionChannel :
284
285
}
285
286
287
+ c .opts .Logger .Debug (context .Background (), "setting remote description" )
286
288
err := c .rtc .SetRemoteDescription (remoteDescription )
287
289
if err != nil {
288
290
c .pendingCandidatesMutex .Unlock ()
@@ -305,6 +307,7 @@ func (c *Conn) negotiate() {
305
307
_ = c .CloseWithError (xerrors .Errorf ("create answer: %w" , err ))
306
308
return
307
309
}
310
+ c .opts .Logger .Debug (context .Background (), "setting local description" )
308
311
err = c .rtc .SetLocalDescription (answer )
309
312
if err != nil {
310
313
_ = c .CloseWithError (xerrors .Errorf ("set local description: %w" , err ))
@@ -350,6 +353,7 @@ func (c *Conn) flushPendingCandidates() error {
350
353
}
351
354
352
355
c .pendingLocalCandidates = make ([]webrtc.ICECandidateInit , 0 )
356
+ c .pendingRemoteCandidates = make ([]webrtc.ICECandidateInit , 0 )
353
357
c .pendingCandidatesFlushed = true
354
358
c .opts .Logger .Debug (context .Background (), "flushed candidates" )
355
359
return nil
0 commit comments