MCPcopy Create free account
hub / github.com/CPChain/chain / stopWS

Method stopWS

node/node.go:381–391  ·  view source on GitHub ↗

stopWS terminates the websocket RPC endpoint.

()

Source from the content-addressed store, hash-verified

379
380// stopWS terminates the websocket RPC endpoint.
381func (n *Node) stopWS() {
382 if n.wsListener != nil {
383 _ = n.wsListener.Close()
384 n.wsListener = nil
385 n.log.Info("WebSocket endpoint closed", "url", fmt.Sprintf("ws://%s", n.wsEndpoint))
386 }
387 if n.wsHandler != nil {
388 n.wsHandler.Stop()
389 n.wsHandler = nil
390 }
391}
392
393// Stop terminates a running node along with all it's services. In the node was
394// not started, an error is returned.

Callers 2

stopRPCMethod · 0.95
StopWSMethod · 0.80

Calls 3

CloseMethod · 0.65
InfoMethod · 0.65
StopMethod · 0.65

Tested by

no test coverage detected