mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 04:07:35 +03:00
link to the wiki explaining the UDP receive buffer size
This commit is contained in:
parent
0eb3f14a60
commit
b0974c14ad
3 changed files with 7 additions and 7 deletions
|
@ -96,7 +96,7 @@ func newPacketHandlerMap(
|
|||
) (packetHandlerManager, error) {
|
||||
if err := setReceiveBuffer(c, logger); err != nil {
|
||||
receiveBufferWarningOnce.Do(func() {
|
||||
log.Println(err)
|
||||
log.Printf("%s. See https://github.com/lucas-clemente/quic-go/wiki/UDP-Receive-Buffer-Size for details.", err)
|
||||
})
|
||||
}
|
||||
conn, err := wrapConn(c)
|
||||
|
|
|
@ -4,10 +4,7 @@ import (
|
|||
"bytes"
|
||||
"crypto/rand"
|
||||
"errors"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
mocklogging "github.com/lucas-clemente/quic-go/internal/mocks/logging"
|
||||
|
@ -66,7 +63,6 @@ var _ = Describe("Packet Handler Map", func() {
|
|||
})
|
||||
|
||||
JustBeforeEach(func() {
|
||||
log.SetOutput(ioutil.Discard)
|
||||
conn = NewMockPacketConn(mockCtrl)
|
||||
conn.EXPECT().LocalAddr().Return(&net.UDPAddr{}).AnyTimes()
|
||||
conn.EXPECT().ReadFrom(gomock.Any()).DoAndReturn(func(b []byte) (int, net.Addr, error) {
|
||||
|
@ -81,8 +77,6 @@ var _ = Describe("Packet Handler Map", func() {
|
|||
handler = phm.(*packetHandlerMap)
|
||||
})
|
||||
|
||||
AfterEach(func() { log.SetOutput(os.Stdout) })
|
||||
|
||||
It("closes", func() {
|
||||
getMultiplexer() // make the sync.Once execute
|
||||
// replace the clientMuxer. getClientMultiplexer will now return the MockMultiplexer
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package quic
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
|
@ -23,6 +25,10 @@ var _ = BeforeEach(func() {
|
|||
connMuxerOnce = *new(sync.Once)
|
||||
})
|
||||
|
||||
var _ = BeforeSuite(func() {
|
||||
log.SetOutput(ioutil.Discard)
|
||||
})
|
||||
|
||||
var _ = AfterEach(func() {
|
||||
mockCtrl.Finish()
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue