forked from quic-go/quic-go
Merge pull request #945 from lucas-clemente/fix-transport-paramter-timeout-encoding
fix encoding of the idle timeout for the TLS transport parameters
This commit is contained in:
@@ -222,7 +222,7 @@ var _ = Describe("Transport Parameters", func() {
|
||||
params = &TransportParameters{
|
||||
StreamFlowControlWindow: 0xdeadbeef,
|
||||
ConnectionFlowControlWindow: 0xdecafbad,
|
||||
IdleTimeout: 0xcafe,
|
||||
IdleTimeout: 0xcafe * time.Second,
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ func (p *TransportParameters) getTransportParameters() []transportParameter {
|
||||
// TODO: use a reasonable value here
|
||||
binary.BigEndian.PutUint32(initialMaxStreamID, math.MaxUint32)
|
||||
idleTimeout := make([]byte, 2)
|
||||
binary.BigEndian.PutUint16(idleTimeout, uint16(p.IdleTimeout))
|
||||
binary.BigEndian.PutUint16(idleTimeout, uint16(p.IdleTimeout/time.Second))
|
||||
maxPacketSize := make([]byte, 2)
|
||||
binary.BigEndian.PutUint16(maxPacketSize, uint16(protocol.MaxReceivePacketSize))
|
||||
params := []transportParameter{
|
||||
|
||||
Reference in New Issue
Block a user