Browse Source

Improve pubsub.Ping doc

Fixes #270.
Gary Burd 8 years ago
parent
commit
b925df3cc1
1 changed files with 3 additions and 0 deletions
  1. 3 0
      redis/pubsub.go

+ 3 - 0
redis/pubsub.go

@@ -94,6 +94,9 @@ func (c PubSubConn) PUnsubscribe(channel ...interface{}) error {
 }
 
 // Ping sends a PING to the server with the specified data.
+//
+// The connection must be subscribed to at least one channel or pattern when
+// calling this method.
 func (c PubSubConn) Ping(data string) error {
 	c.Conn.Send("PING", data)
 	return c.Conn.Flush()