MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / Stop

Method Stop

rpc/jsonrpc/websocket.go:63–71  ·  view source on GitHub ↗

Stop stops the server and returns a channel indicating server is stopped.

()

Source from the content-addressed store, hash-verified

61
62// Stop stops the server and returns a channel indicating server is stopped.
63func (ws *WebsocketServer) Stop() {
64 log.Warn("jsonrpc: shutdown server")
65 ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
66 if err := ws.Server.Shutdown(ctx); err != nil {
67 log.WithError(err).Error("jsonrpc: shutdown server")
68 }
69 cancel()
70 log.Warn("jsonrpc: server stopped")
71}

Callers 9

TestRawCallerFunction · 0.45
TestIncCounterFunction · 0.45
TestIncCounterSimpleArgsFunction · 0.45
TestETLSBugFunction · 0.45
TestEncPingFindNeighborFunction · 0.45
TestCaller_CallNodeFunction · 0.45

Calls 4

WarnFunction · 0.92
WithErrorFunction · 0.92
ErrorMethod · 0.80
ShutdownMethod · 0.45

Tested by 9

TestRawCallerFunction · 0.36
TestIncCounterFunction · 0.36
TestIncCounterSimpleArgsFunction · 0.36
TestETLSBugFunction · 0.36
TestEncPingFindNeighborFunction · 0.36
TestCaller_CallNodeFunction · 0.36