peerconn.go | 4 +++- diff --git a/peerconn.go b/peerconn.go index 0e267a78a31bff77dbfeb25e42728cba831a406f..3e18544bf3645696027c409a43d3e6507e7fb9b7 100644 --- a/peerconn.go +++ b/peerconn.go @@ -601,7 +601,9 @@ cn.fillWriteBuffer(func(msg pp.Message) bool { cn.wroteMsg(&msg) cn.writeBuffer.Write(msg.MustMarshalBinary()) torrent.Add(fmt.Sprintf("messages filled of type %s", msg.Type.String()), 1) - return cn.writeBuffer.Len() < 1<<16 // 64KiB + // 64KiB, but temporarily less to work around an issue with WebRTC. TODO: Update + // when https://github.com/pion/datachannel/issues/59 is fixed. + return cn.writeBuffer.Len() < 1<<15 }) } if cn.writeBuffer.Len() == 0 && time.Since(lastWrite) >= keepAliveTimeout {