forked from mirror/redcon
Merge pull request #48 from shankai/master
Fix: unsubscribe single channel from (p)subscribe.
This commit is contained in:
commit
12fd027cec
|
@ -1358,14 +1358,12 @@ func (ps *PubSub) unsubscribe(conn Conn, pattern, all bool, channel string) {
|
|||
}
|
||||
} else {
|
||||
// unsubscribe single channel from (p)subscribe.
|
||||
var entry *pubSubEntry
|
||||
for ient := range sconn.entries {
|
||||
if ient.pattern == pattern && ient.channel == channel {
|
||||
removeEntry(entry)
|
||||
removeEntry(ient)
|
||||
break
|
||||
}
|
||||
}
|
||||
removeEntry(entry)
|
||||
}
|
||||
sconn.dconn.Flush()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue