mirror of
https://github.com/sot-tech/mochi.git
synced 2026-05-11 14:41:16 -07:00
Disable HTTP KeepAlives
This commit is contained in:
@@ -127,6 +127,8 @@ func Serve(cfg *config.Config, tkr *tracker.Tracker) {
|
||||
},
|
||||
}
|
||||
|
||||
grace.SetKeepAlivesEnabled(false)
|
||||
|
||||
if err := grace.ListenAndServe(); err != nil {
|
||||
if opErr, ok := err.(*net.OpError); !ok || (ok && opErr.Op != "accept") {
|
||||
glog.Errorf("Failed to gracefully run HTTP server: %s", err.Error())
|
||||
|
||||
Reference in New Issue
Block a user