Explorar el Código

Improve pubsub.Ping doc

Fixes #270.
Gary Burd hace 8 años
padre
commit
b925df3cc1
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  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()