From 23a87304cc2d2c9d2ae64c19a0b802d23ec3be3d Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Tue, 8 Aug 2017 13:20:58 -0400 Subject: [PATCH] add a comment for PingPongLatencyTimer [ci skip] --- rpc/lib/client/ws_client.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rpc/lib/client/ws_client.go b/rpc/lib/client/ws_client.go index d1bfc1d37..2c379c86a 100644 --- a/rpc/lib/client/ws_client.go +++ b/rpc/lib/client/ws_client.go @@ -19,7 +19,7 @@ import ( ) const ( - // Time allowed to write a message to the peer. + // Time allowed to write a message to the server. writeWait = 10 * time.Second // Maximum reconnect attempts @@ -40,6 +40,8 @@ type WSClient struct { Endpoint string // /websocket/url/endpoint Dialer func(string, string) (net.Conn, error) + // Time between sending a ping and receiving a pong. See + // https://godoc.org/github.com/rcrowley/go-metrics#Timer. PingPongLatencyTimer metrics.Timer // user facing channels, closed only when the client is being stopped.