Skip to content

Commit

Permalink
Merge pull request #31 from libp2p/update-deps
Browse files Browse the repository at this point in the history
update to the latest quic-go, gx publish
  • Loading branch information
Stebalien authored Aug 16, 2018
2 parents 137965e + 005db42 commit 7ff218a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion p2p/transport/quic/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion p2p/transport/quic/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion p2p/transport/quic/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7ff218a

Please sign in to comment.