equivalent to Printf() followed by a call to os.Exit(1).
When a node returns an error in ReqResp _before_ actually pulling the response off the wire, close the tcp connection so that subsequent requests dont try pulling the earlier response. Additionally, this requires a change to try to re-dialing in the begining of ReqResp if the node is not already connected
It's possible that a riak node can return a poorly formated response in a PING, in this case, the client was crashing because resp was not nil but also wasnt something that could be stringified.
… signalling to ping by closing the channel. time.Ticker was a better fit for what's happening in BackgroundNodePing. I've also removed a possible memory leak by closing the ticker when the client is closed.
The for-loop in BackgroundPing continued to run even after Close was called on the client. With a closed client the ping would cause Go to panic. The panic occurs because the node.conn field is set to nil when the node is closed and ping tries to use the field.