changes required to convert to Echo v5 #7
@@ -263,11 +263,22 @@ func main() {
|
|||||||
database.AmStoreAudit(database.AmNewAudit(database.AuditShutdown, 0, myIP.String()))
|
database.AmStoreAudit(database.AmNewAudit(database.AuditShutdown, 0, myIP.String()))
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
// Set up the start configuration.
|
||||||
sconf := echo.StartConfig{
|
sconf := echo.StartConfig{
|
||||||
Address: config.GlobalComputedConfig.Listen,
|
Address: config.GlobalComputedConfig.Listen,
|
||||||
HideBanner: true,
|
HideBanner: true,
|
||||||
HidePort: true,
|
HidePort: true,
|
||||||
GracefulTimeout: 10 * time.Second,
|
GracefulTimeout: 10 * time.Second,
|
||||||
|
OnShutdownError: func(err error) {
|
||||||
|
log.Fatalf("error in shutting down the server: %v", err)
|
||||||
|
},
|
||||||
|
BeforeServeFunc: func(s *http.Server) error {
|
||||||
|
s.ReadTimeout = 30 * time.Second
|
||||||
|
s.WriteTimeout = 30 * time.Second
|
||||||
|
s.IdleTimeout = 120 * time.Second
|
||||||
|
s.ReadHeaderTimeout = 2 * time.Second
|
||||||
|
return nil
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
stime := time.Since(SystemStartTime)
|
stime := time.Since(SystemStartTime)
|
||||||
|
|||||||
Reference in New Issue
Block a user