Add timeout for idle connections

This commit is contained in:
Augusto Dwenger 2020-10-27 12:07:30 +01:00
parent 96f1638564
commit d6158dbe37

View file

@ -68,6 +68,7 @@ func main() {
Addr: fmt.Sprintf(":%d", servePort),
WriteTimeout: 15 * time.Second,
ReadTimeout: 15 * time.Second,
IdleTimeout: 120 * time.Second,
}
var wg sync.WaitGroup