Преглед изворни кода

Improve pubsub.Ping doc

Fixes #270.
Gary Burd пре 9 година
родитељ
комит
b925df3cc1
1 измењених фајлова са 3 додато и 0 уклоњено
  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()