Browse Source

update quic-go to v0.9.0, use the quic-go milestone version

pull/1424/head
Marten Seemann 6 years ago
parent
commit
005db422e6
  1. 2
      p2p/transport/quic/conn.go
  2. 2
      p2p/transport/quic/listener.go
  3. 2
      p2p/transport/quic/transport.go

2
p2p/transport/quic/conn.go

@ -25,7 +25,7 @@ type conn struct {
var _ tpt.Conn = &conn{}
func (c *conn) Close() error {
return c.sess.Close(nil)
return c.sess.Close()
}
// IsClosed returns whether a connection is fully closed.

2
p2p/transport/quic/listener.go

@ -65,7 +65,7 @@ func (l *listener) Accept() (tpt.Conn, error) {
}
conn, err := l.setupConn(sess)
if err != nil {
sess.Close(err)
sess.CloseWithError(0, err)
continue
}
return conn, nil

2
p2p/transport/quic/transport.go

@ -19,11 +19,11 @@ import (
)
var quicConfig = &quic.Config{
Versions: []quic.VersionNumber{quic.VersionMilestone0_9_0},
MaxIncomingStreams: 1000,
MaxIncomingUniStreams: -1, // disable unidirectional streams
MaxReceiveStreamFlowControlWindow: 3 * (1 << 20), // 3 MB
MaxReceiveConnectionFlowControlWindow: 4.5 * (1 << 20), // 4.5 MB
Versions: []quic.VersionNumber{101},
AcceptCookie: func(clientAddr net.Addr, cookie *quic.Cookie) bool {
// TODO(#6): require source address validation when under load
return true

Loading…
Cancel
Save