MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / unsubscribe

Method unsubscribe

internal/redisqueue/queue.go:186–197  ·  view source on GitHub ↗
(id uint64)

Source from the content-addressed store, hash-verified

184}
185
186func (q *queue) unsubscribe(id uint64) {
187 q.mu.Lock()
188 subscriber, ok := q.subscribers[id]
189 if ok {
190 delete(q.subscribers, id)
191 }
192 q.mu.Unlock()
193
194 if ok {
195 close(subscriber)
196 }
197}
198
199func (q *queue) popOldest(count int) [][]byte {
200 now := time.Now()

Callers 1

subscribeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected