[server] Fix HTTP/3 QUIC library integration.

This commit is contained in:
Ciprian Dorin Craciun 2022-09-07 11:45:52 +03:00
parent 02f1b6eefa
commit ec3c3c35be

View file

@ -1786,18 +1786,14 @@ func main_0 () (error) {
_httpQuicServer := & http3.Server {} _httpQuicServer := & http3.Server {
_httpQuicServer.Server = & http.Server {
Handler : _server, Handler : _server,
TLSConfig : nil, TLSConfig : nil,
} }
_tls3Config := _tls1Config.Clone () _tls3Config := _tls1Config.Clone ()
_tls3Config.NextProtos = []string { "h3", "h3-29" } _tls3Config.NextProtos = []string { "h3", "h3-29" }
_httpQuicServer.Server.TLSConfig = _tls3Config _httpQuicServer.TLSConfig = _tls3Config
_httpQuicServer.QuicConfig = & quic.Config { _httpQuicServer.QuicConfig = & quic.Config {
@ -1817,15 +1813,16 @@ func main_0 () (error) {
InitialStreamReceiveWindow : 512 * 1024, InitialStreamReceiveWindow : 512 * 1024,
MaxStreamReceiveWindow : 2 * 1024 * 1024, MaxStreamReceiveWindow : 2 * 1024 * 1024,
KeepAlive : true, KeepAlivePeriod : 60 * time.Second,
} }
if !_quiet { // FIXME: Control the error logging!
_httpQuicServer.Server.ErrorLog = log.New (os.Stderr, log.Prefix () + "[ee] [a6af7354] [quic-h3.] | ", 0) //if !_quiet {
} else { // _httpQuicServer.ErrorLog = log.New (os.Stderr, log.Prefix () + "[ee] [a6af7354] [quic-h3.] | ", 0)
_httpQuicServer.Server.ErrorLog = log.New (ioutil.Discard, "", 0) //} else {
} // _httpQuicServer.ErrorLog = log.New (ioutil.Discard, "", 0)
//}