MCPcopy
hub / github.com/google/gvisor / ResetServer

Method ResetServer

pkg/control/server/server.go:63–67  ·  view source on GitHub ↗

ResetServer resets the server, clearing all registered objects. It stops the old server asynchronously.

()

Source from the content-addressed store, hash-verified

61// ResetServer resets the server, clearing all registered objects. It stops the
62// old server asynchronously.
63func (s *Server) ResetServer() {
64 if old := s.server.Swap(urpc.NewServer()); old != nil {
65 go old.Stop(0)
66 }
67}
68
69// FD returns the file descriptor that the server is running on.
70func (s *Server) FD() int {

Callers 1

refreshHandlersMethod · 0.80

Calls 3

NewServerFunction · 0.92
StopMethod · 0.65
SwapMethod · 0.45

Tested by

no test coverage detected