MCPcopy
hub / github.com/canopy-network/canopy / Stop

Method Stop

controller/controller.go:166–179  ·  view source on GitHub ↗

Stop() terminates the Controller service

()

Source from the content-addressed store, hash-verified

164
165// Stop() terminates the Controller service
166func (c *Controller) Stop() {
167 // lock the controller
168 c.Lock()
169 // unlock when the function completes
170 defer c.Unlock()
171 // close the controller mempool store
172 c.Mempool.FSM.Discard()
173 // stop the store module
174 if err := c.FSM.Store().(lib.StoreI).Close(); err != nil {
175 c.log.Error(err.Error())
176 }
177 // stop the p2p module
178 c.P2P.Stop()
179}
180
181// ROOT CHAIN CALLS BELOW
182

Callers 2

SyncMethod · 0.45
StartMethod · 0.45

Calls 6

LockMethod · 0.95
UnlockMethod · 0.95
StoreMethod · 0.80
DiscardMethod · 0.65
CloseMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected