Describe the bug
redis-cli continue to be in pubsub/subscribed mode even if the server has unsubscribed the client for a given channel. This applies for both classic and sharded pubsub.
To reproduce
127.0.0.1:6379(subscribed mode)> SUBSCRIBE ch1
1) "subscribe"
2) "ch1"
3) (integer) 1
127.0.0.1:6379(subscribed mode)> unsubscribe ch1
1) "unsubscribe"
2) "ch1"
3) (integer) 0
127.0.0.1:6379(subscribed mode)>
Expected behavior
redis-cli should exit the subscribed mode
Additional information
Discussed in #12577