Browse Source

Merge pull request #54 from libp2p/quic-go-0.11.0

update quic-go to v0.11.0
pull/1424/head
Steven Allen 6 years ago
committed by GitHub
parent
commit
6cca441789
  1. 4
      p2p/transport/quic/conn_test.go
  2. 7
      p2p/transport/quic/stream.go
  3. 1
      p2p/transport/quic/transport.go

4
p2p/transport/quic/conn_test.go

@ -137,7 +137,7 @@ var _ = Describe("Connection", func() {
// dial, but expect the wrong peer ID
_, err = clientTransport.Dial(context.Background(), serverAddr, thirdPartyID)
Expect(err).To(HaveOccurred())
Expect(err.Error()).To(ContainSubstring("TLS handshake error: bad certificate"))
Expect(err.Error()).To(ContainSubstring("CRYPTO_ERROR"))
Consistently(serverConnChan).ShouldNot(Receive())
})
@ -165,7 +165,7 @@ var _ = Describe("Connection", func() {
Expect(err).ToNot(HaveOccurred())
_, err = clientTransport.Dial(context.Background(), serverAddr, serverID)
Expect(err).To(HaveOccurred())
Expect(err.Error()).To(ContainSubstring("TLS handshake error: bad certificate"))
Expect(err.Error()).To(ContainSubstring("CRYPTO_ERROR"))
Consistently(serverConnChan).ShouldNot(Receive())
})

7
p2p/transport/quic/stream.go

@ -12,8 +12,7 @@ type stream struct {
var _ smux.Stream = &stream{}
func (s *stream) Reset() error {
if err := s.Stream.CancelRead(0); err != nil {
return err
}
return s.Stream.CancelWrite(0)
s.Stream.CancelRead(0)
s.Stream.CancelWrite(0)
return nil
}

1
p2p/transport/quic/transport.go

@ -19,7 +19,6 @@ import (
)
var quicConfig = &quic.Config{
Versions: []quic.VersionNumber{quic.VersionMilestone0_10_0},
MaxIncomingStreams: 1000,
MaxIncomingUniStreams: -1, // disable unidirectional streams
MaxReceiveStreamFlowControlWindow: 3 * (1 << 20), // 3 MB

Loading…
Cancel
Save