Skip to content

Commit 5292440

Browse files
dvushVitalii Drohan
andauthored
1h default idle timeout (#23)
## πŸ“ Summary <!--- A general summary of your changes --> ## β›± Motivation and Context <!--- Why is this change required? What problem does it solve? --> ## πŸ“š References <!-- Any interesting external links to documentation, articles, tweets which add value to the PR --> --- ## βœ… I have run these commands * [ ] `make lint` * [ ] `make test` * [ ] `go mod tidy` Co-authored-by: Vitalii Drohan <[email protected]>
1 parent 7715ba7 commit 5292440

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

β€Žproxy/receiver_servers.goβ€Ž

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
var (
1111
HTTPDefaultReadTimeout = 60 * time.Second
1212
HTTPDefaultWriteTimeout = 30 * time.Second
13+
HTTPDefaultIdleTimeout = 1 * time.Hour
1314
)
1415

1516
type ReceiverProxyServers struct {
@@ -26,19 +27,22 @@ func StartReceiverServers(proxy *ReceiverProxy, publicListenAddress, localListen
2627
TLSConfig: proxy.TLSConfig(),
2728
ReadTimeout: HTTPDefaultReadTimeout,
2829
WriteTimeout: HTTPDefaultWriteTimeout,
30+
IdleTimeout: HTTPDefaultIdleTimeout,
2931
}
3032
localServer := &http.Server{
3133
Addr: localListenAddress,
3234
Handler: proxy.LocalHandler,
3335
TLSConfig: proxy.TLSConfig(),
3436
ReadTimeout: HTTPDefaultReadTimeout,
3537
WriteTimeout: HTTPDefaultWriteTimeout,
38+
IdleTimeout: HTTPDefaultIdleTimeout,
3639
}
3740
certServer := &http.Server{
3841
Addr: certListenAddress,
3942
Handler: proxy.CertHandler,
4043
ReadTimeout: HTTPDefaultReadTimeout,
4144
WriteTimeout: HTTPDefaultWriteTimeout,
45+
IdleTimeout: HTTPDefaultIdleTimeout,
4246
}
4347

4448
errCh := make(chan error)

0 commit comments

Comments
Β (0)