This commit is contained in:
crusader 2018-08-23 17:40:06 +09:00
parent e78f235740
commit 6d0ae76b5c
2 changed files with 8 additions and 8 deletions

6
Gopkg.lock generated
View File

@ -11,13 +11,13 @@
branch = "master" branch = "master"
name = "git.loafle.net/overflow/log-go" name = "git.loafle.net/overflow/log-go"
packages = ["."] packages = ["."]
revision = "93f396a4335da70aac4dfa146bebba323424b157" revision = "db46df21338e4bf16f20bfe3bf6a4ea5aa222fc8"
[[projects]] [[projects]]
branch = "master" branch = "master"
name = "git.loafle.net/overflow/util-go" name = "git.loafle.net/overflow/util-go"
packages = ["ctx"] packages = ["ctx"]
revision = "c6e5aef1a08d21290038e1dfd4d532d1770fce04" revision = "01cc315e25b38331c0a366d8025600ed4e297e8e"
[[projects]] [[projects]]
name = "github.com/BurntSushi/toml" name = "github.com/BurntSushi/toml"
@ -91,6 +91,6 @@
[solve-meta] [solve-meta]
analyzer-name = "dep" analyzer-name = "dep"
analyzer-version = 1 analyzer-version = 1
inputs-digest = "5a46d6beb0750003f59e9f3c34fcaedb4ae836d2a8a46d111ea62059d4d08480" inputs-digest = "4bb51631715d15c06b7ed024bca6e2d3bc3b6aea3a8f3b69802d87e3a78d20f3"
solver-name = "gps-cdcl" solver-name = "gps-cdcl"
solver-version = 1 solver-version = 1

View File

@ -67,7 +67,7 @@ func (s *Server) ListenAndServe() error {
} }
if err = s.ServerHandler.Init(s.ctx); nil != err { if err = s.ServerHandler.Init(s.ctx); nil != err {
olog.Logger().Errorf("%s Init has been failed %v", s.logHeader(), err) olog.Logger().Error(fmt.Sprintf("%s Init has been failed %v", s.logHeader(), err))
return err return err
} }
@ -115,13 +115,13 @@ func (s *Server) handleServer(listener net.Listener) error {
} }
s.ServerHandler.OnStop(s.ctx) s.ServerHandler.OnStop(s.ctx)
olog.Logger().Infof("%s Stopped", s.logHeader()) olog.Logger().Info(fmt.Sprintf("%s Stopped", s.logHeader()))
s.stopWg.Done() s.stopWg.Done()
}() }()
if err = s.ServerHandler.OnStart(s.ctx); nil != err { if err = s.ServerHandler.OnStart(s.ctx); nil != err {
olog.Logger().Errorf("%s OnStart has been failed %v", s.logHeader(), err) olog.Logger().Error(fmt.Sprintf("%s OnStart has been failed %v", s.logHeader(), err))
return err return err
} }
@ -136,7 +136,7 @@ func (s *Server) handleServer(listener net.Listener) error {
hsCloseChan <- nil hsCloseChan <- nil
}() }()
olog.Logger().Infof("%s Started", s.logHeader()) olog.Logger().Info(fmt.Sprintf("%s Started", s.logHeader()))
select { select {
case err, _ := <-hsCloseChan: case err, _ := <-hsCloseChan:
@ -162,7 +162,7 @@ func (s *Server) httpHandler(ctx *fasthttp.RequestCtx) {
if 0 < s.ServerHandler.GetConcurrency() { if 0 < s.ServerHandler.GetConcurrency() {
sz := s.srw.ConnectionSize() sz := s.srw.ConnectionSize()
if sz >= s.ServerHandler.GetConcurrency() { if sz >= s.ServerHandler.GetConcurrency() {
olog.Logger().Warnf("%s max connections size %d, refuse", s.logHeader(), sz) olog.Logger().Warn(fmt.Sprintf("%s max connections size %d, refuse", s.logHeader(), sz))
s.onError(ctx, fasthttp.StatusServiceUnavailable, err) s.onError(ctx, fasthttp.StatusServiceUnavailable, err)
return return
} }