MCPcopy
hub / github.com/spacecloud-io/space-cloud / Close

Method Close

runner/modules/pubsub/pubsub.go:48–60  ·  view source on GitHub ↗

Close closes the redis client along with the active subscriptions on it

()

Source from the content-addressed store, hash-verified

46
47// Close closes the redis client along with the active subscriptions on it
48func (m *Module) Close() {
49 m.lock.Lock()
50 defer m.lock.Unlock()
51
52 // Close all active subscriptions first
53 for _, sub := range m.mapping {
54 _ = sub.pubsub.Close()
55 }
56 m.mapping = map[string]*subscription{}
57
58 // Close the redis client
59 _ = m.client.Close()
60}

Callers

nothing calls this directly

Calls 3

CloseMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected