forked from mirror/redcon
Fix: unsubscribe single channel from (p)subscribe.
This commit is contained in:
parent
0cb26bc5a4
commit
0f365a5602
|
@ -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