From ec3c3c35bebd6c322bebea6852e88d74fbb3432a Mon Sep 17 00:00:00 2001 From: Ciprian Dorin Craciun Date: Wed, 7 Sep 2022 11:45:52 +0300 Subject: [PATCH] [server] Fix HTTP/3 QUIC library integration. --- sources/cmd/server/server.go | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/sources/cmd/server/server.go b/sources/cmd/server/server.go index efc7e43..fc9fc9b 100644 --- a/sources/cmd/server/server.go +++ b/sources/cmd/server/server.go @@ -1786,18 +1786,14 @@ func main_0 () (error) { - _httpQuicServer := & http3.Server {} - - _httpQuicServer.Server = & http.Server { - + _httpQuicServer := & http3.Server { Handler : _server, TLSConfig : nil, - } _tls3Config := _tls1Config.Clone () _tls3Config.NextProtos = []string { "h3", "h3-29" } - _httpQuicServer.Server.TLSConfig = _tls3Config + _httpQuicServer.TLSConfig = _tls3Config _httpQuicServer.QuicConfig = & quic.Config { @@ -1817,15 +1813,16 @@ func main_0 () (error) { InitialStreamReceiveWindow : 512 * 1024, MaxStreamReceiveWindow : 2 * 1024 * 1024, - KeepAlive : true, + KeepAlivePeriod : 60 * time.Second, } - if !_quiet { - _httpQuicServer.Server.ErrorLog = log.New (os.Stderr, log.Prefix () + "[ee] [a6af7354] [quic-h3.] | ", 0) - } else { - _httpQuicServer.Server.ErrorLog = log.New (ioutil.Discard, "", 0) - } + // FIXME: Control the error logging! + //if !_quiet { + // _httpQuicServer.ErrorLog = log.New (os.Stderr, log.Prefix () + "[ee] [a6af7354] [quic-h3.] | ", 0) + //} else { + // _httpQuicServer.ErrorLog = log.New (ioutil.Discard, "", 0) + //}