MCPcopy
hub / github.com/redis/go-redis / Close

Method Close

pubsub.go:212–228  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

210}
211
212func (c *PubSub) Close() error {
213 c.mu.Lock()
214 defer c.mu.Unlock()
215
216 if c.closed {
217 return pool.ErrClosed
218 }
219 c.closed = true
220 close(c.exit)
221
222 // Call cleanup callback if set
223 if c.onClose != nil {
224 c.onClose()
225 }
226
227 return c.closeTheCn(pool.ErrClosed)
228}
229
230// Subscribe the client to the specified channels. It returns
231// empty subscription if there are no channels.

Callers

nothing calls this directly

Calls 1

closeTheCnMethod · 0.95

Tested by

no test coverage detected