mirror of
https://github.com/sot-tech/mochi.git
synced 2026-05-21 07:14:48 -07:00
server/prom: get rid of unneeded graceful call
This commit is contained in:
@@ -65,7 +65,6 @@ func NewServerConfig(srvcfg *chihaya.ServerConfig) (*ServerConfig, error) {
|
|||||||
type Server struct {
|
type Server struct {
|
||||||
cfg *ServerConfig
|
cfg *ServerConfig
|
||||||
grace *graceful.Server
|
grace *graceful.Server
|
||||||
stopped bool
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ server.Server = &Server{}
|
var _ server.Server = &Server{}
|
||||||
@@ -85,9 +84,4 @@ func (s *Server) Start() {
|
|||||||
|
|
||||||
func (s *Server) Stop() {
|
func (s *Server) Stop() {
|
||||||
s.grace.Stop(s.cfg.ShutdownTimeout)
|
s.grace.Stop(s.cfg.ShutdownTimeout)
|
||||||
stopChan := s.grace.StopChan()
|
|
||||||
|
|
||||||
// Block until the graceful server shuts down and closes this channel.
|
|
||||||
for range stopChan {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user