From 480176ba2dec10459b21a1d3baec6b91ac33cc60 Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Wed, 12 Aug 2020 21:41:31 +0200 Subject: [PATCH] rpc/dataconn: fix go1.15-discovered recursive Error() method impl rpc/dataconn/dataconn_client.go:69:9: Sprintf format %s with arg e causes recursive Error method call --- rpc/dataconn/dataconn_client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpc/dataconn/dataconn_client.go b/rpc/dataconn/dataconn_client.go index 2919df4..6751af2 100644 --- a/rpc/dataconn/dataconn_client.go +++ b/rpc/dataconn/dataconn_client.go @@ -66,7 +66,7 @@ type ProtocolError struct { } func (e *ProtocolError) Error() string { - return fmt.Sprintf("protocol error: %s", e) + return fmt.Sprintf("protocol error: %s", e.cause) } func (c *Client) recv(ctx context.Context, conn *stream.Conn, res proto.Message) error {