MCPcopy Create free account
hub / github.com/cairoeth/preconfirmations / stopMainServer

Method stopMainServer

rpc/server/server.go:182–192  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

180}
181
182func (s *RPCEndPointServer) stopMainServer() {
183 if s.server != nil {
184 ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
185 defer cancel()
186 if err := s.server.Shutdown(ctx); err != nil {
187 s.logger.Error("http server shutdown failed", zap.Error(err))
188 }
189 s.logger.Info("http server stopped")
190 s.server = nil
191 }
192}
193
194func (s *RPCEndPointServer) startDrainServer() {
195 if s.drain != nil {

Callers 1

StartMethod · 0.95

Calls 1

ErrorMethod · 0.45

Tested by

no test coverage detected