forked from TrueCloudLab/frostfs-http-gw
don't panic on http.ErrServerClosed
This commit is contained in:
parent
307f008dac
commit
468cf49126
1 changed files with 2 additions and 1 deletions
3
main.go
3
main.go
|
@ -3,6 +3,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"crypto/ecdsa"
|
"crypto/ecdsa"
|
||||||
|
"errors"
|
||||||
"net/http"
|
"net/http"
|
||||||
_ "net/http/pprof"
|
_ "net/http/pprof"
|
||||||
"time"
|
"time"
|
||||||
|
@ -63,7 +64,7 @@ func main() {
|
||||||
l.Info("run gateway server",
|
l.Info("run gateway server",
|
||||||
zap.String("address", v.GetString("listen_address")))
|
zap.String("address", v.GetString("listen_address")))
|
||||||
|
|
||||||
if err := e.Start(v.GetString("listen_address")); err != nil {
|
if err := e.Start(v.GetString("listen_address")); err != nil && !errors.Is(err, http.ErrServerClosed) {
|
||||||
l.Panic("could not start server", zap.Error(err))
|
l.Panic("could not start server", zap.Error(err))
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
Loading…
Reference in a new issue