From e8538d606aa9700da03f748f61d734e8cbc1438b Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Wed, 4 May 2016 10:39:43 -0400 Subject: [PATCH] add blank client interface --- client/http_client.go | 7 ++++++- server/handlers.go | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/client/http_client.go b/client/http_client.go index e9e18bfa8..7c0480600 100644 --- a/client/http_client.go +++ b/client/http_client.go @@ -33,6 +33,11 @@ func socketTransport(remote string) *http.Transport { //------------------------------------------------------------------------------------ +type Client interface { +} + +//------------------------------------------------------------------------------------ + // JSON rpc takes params as a slice type ClientJSONRPC struct { remote string @@ -60,7 +65,7 @@ func (c *ClientJSONRPC) call(method string, params []interface{}, result interfa } requestBytes := wire.JSONBytes(request) requestBuf := bytes.NewBuffer(requestBytes) - log.Info(Fmt("RPC request to %v (%v): %v", c.remote, method, string(requestBytes))) + // log.Info(Fmt("RPC request to %v (%v): %v", c.remote, method, string(requestBytes))) httpResponse, err := c.client.Post(dummyDomain, "text/json", requestBuf) if err != nil { return nil, err diff --git a/server/handlers.go b/server/handlers.go index b150c6076..1c447c6c9 100644 --- a/server/handlers.go +++ b/server/handlers.go @@ -387,7 +387,7 @@ func (wsc *wsConnection) readRoutine() { // We use `readTimeout` to handle read timeouts. _, in, err := wsc.baseConn.ReadMessage() if err != nil { - log.Notice("Failed to read from connection", "remote", wsc.remoteAddr) + log.Notice("Failed to read from connection", "remote", wsc.remoteAddr, "err", err.Error()) // an error reading the connection, // kill the connection wsc.Stop()