MCPcopy
hub / github.com/kopia/kopia / ShutdownGRPCServer

Method ShutdownGRPCServer

internal/server/grpc_session.go:664–672  ·  view source on GitHub ↗

ShutdownGRPCServer shuts down the GRPC server. Note: Since the GRPC server runs over HTTP handler transport, GracefulStop() doesn't work. We use Stop() instead.

()

Source from the content-addressed store, hash-verified

662// Note: Since the GRPC server runs over HTTP handler transport,
663// GracefulStop() doesn't work. We use Stop() instead.
664func (s *Server) ShutdownGRPCServer() {
665 s.grpcMutex.Lock()
666 defer s.grpcMutex.Unlock()
667
668 if s.grpcServer != nil {
669 s.grpcServer.Stop()
670 s.grpcServer = nil
671 }
672}

Callers 1

runMethod · 0.80

Calls 3

LockMethod · 0.65
UnlockMethod · 0.65
StopMethod · 0.45

Tested by

no test coverage detected