1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-10 18:00:43 +00:00

update quic config

This commit is contained in:
Darien Raymond 2018-11-23 23:51:07 +01:00
parent 275ab2ae8c
commit a1801b5d6f
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
2 changed files with 5 additions and 7 deletions

View File

@ -96,10 +96,9 @@ func (s *clientSessions) openConnection(destAddr net.Addr, config *Config, tlsCo
quicConfig := &quic.Config{
ConnectionIDLength: 12,
KeepAlive: true,
HandshakeTimeout: time.Second * 4,
IdleTimeout: time.Second * 60,
MaxReceiveStreamFlowControlWindow: 256 * 1024,
MaxReceiveStreamFlowControlWindow: 512 * 1024,
MaxReceiveConnectionFlowControlWindow: 2 * 1024 * 1024,
MaxIncomingUniStreams: -1,
}

View File

@ -43,8 +43,8 @@ func (l *Listener) keepAccepting() {
conn, err := l.listener.Accept()
if err != nil {
newError("failed to accept QUIC sessions").Base(err).WriteToLog()
l.listener.Close()
return
time.Sleep(time.Second)
continue
}
go l.acceptStreams(conn)
}
@ -85,11 +85,10 @@ func Listen(ctx context.Context, address net.Address, port net.Port, streamSetti
quicConfig := &quic.Config{
ConnectionIDLength: 12,
KeepAlive: true,
HandshakeTimeout: time.Second * 4,
IdleTimeout: time.Second * 60,
MaxReceiveStreamFlowControlWindow: 256 * 1024,
MaxReceiveConnectionFlowControlWindow: 2 * 1024 * 1024,
MaxReceiveStreamFlowControlWindow: 512 * 1024,
MaxReceiveConnectionFlowControlWindow: 4 * 1024 * 1024,
MaxIncomingStreams: 64,
MaxIncomingUniStreams: -1,
}