forked from Mirrors/gomuks
gomuks: enable http2 read idle timeouts
This commit is contained in:
parent
4245929da6
commit
74439be24c
1 changed files with 2 additions and 1 deletions
|
@ -181,11 +181,12 @@ func (gmx *Gomuks) StartClient() {
|
|||
httpClient := gmx.Client.Client.Client
|
||||
httpClient.Transport.(*http.Transport).ForceAttemptHTTP2 = false
|
||||
if !gmx.Config.Matrix.DisableHTTP2 {
|
||||
_, err = http2.ConfigureTransports(httpClient.Transport.(*http.Transport))
|
||||
h2, err := http2.ConfigureTransports(httpClient.Transport.(*http.Transport))
|
||||
if err != nil {
|
||||
gmx.Log.WithLevel(zerolog.FatalLevel).Err(err).Msg("Failed to configure HTTP/2")
|
||||
os.Exit(13)
|
||||
}
|
||||
h2.ReadIdleTimeout = 30 * time.Second
|
||||
}
|
||||
userID, err := gmx.Client.DB.Account.GetFirstUserID(ctx)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Reference in a new issue