forked from mirror/redis
pub/sub: Clean up message parsing.
This commit is contained in:
parent
8c7af722cc
commit
4e3743c0d6
|
@ -37,7 +37,6 @@ type Message struct {
|
|||
func (c *PubSubClient) consumeMessages(conn *Conn) {
|
||||
req := NewIfaceSliceReq()
|
||||
|
||||
for {
|
||||
for {
|
||||
msg := &Message{}
|
||||
|
||||
|
@ -73,11 +72,6 @@ func (c *PubSubClient) consumeMessages(conn *Conn) {
|
|||
msg.Err = fmt.Errorf("Unsupported message name: %q.", msgName)
|
||||
}
|
||||
c.ch <- msg
|
||||
|
||||
if conn.Rd.Buffered() <= 0 {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue