Skip to content

Commit 60aa40a

Browse files
authored
fix: Remove microsecond wait in peer.(*Channel) (#1270)
This was implemented when our WebRTC code was much less hardened. It's likely this was a cause of some other problem. Closes #1076.
1 parent eda85a0 commit 60aa40a

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

peer/channel.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"io"
77
"net"
88
"sync"
9-
"time"
109

1110
"github.com/pion/datachannel"
1211
"github.com/pion/webrtc/v3"
@@ -245,13 +244,6 @@ func (c *Channel) Write(bytes []byte) (n int, err error) {
245244
if c.dc.BufferedAmount()+uint64(len(bytes)) >= maxBufferedAmount {
246245
<-c.sendMore
247246
}
248-
// REMARK: There's an obvious race-condition here. This is an edge-case, as
249-
// most-frequently data won't be pooled so synchronously, but is
250-
// definitely possible.
251-
//
252-
// See: https://github.com/pion/sctp/issues/181
253-
time.Sleep(time.Microsecond)
254-
255247
return c.rwc.Write(bytes)
256248
}
257249

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy