Merge pull request #8976 from joel0/wrap-eof

Wrap rpc error object
This commit is contained in:
Daniel Nephin 2020-11-10 17:04:11 -05:00 committed by hashicorp-ci
parent 52f8ada38e
commit 95ed6ec143
1 changed files with 2 additions and 2 deletions

View File

@ -601,7 +601,7 @@ func (p *ConnPool) rpc(dc string, nodeName string, addr net.Addr, method string,
// Get a usable client // Get a usable client
conn, sc, err := p.getClient(dc, nodeName, addr) conn, sc, err := p.getClient(dc, nodeName, addr)
if err != nil { if err != nil {
return fmt.Errorf("rpc error getting client: %v", err) return fmt.Errorf("rpc error getting client: %w", err)
} }
// Make the RPC call // Make the RPC call
@ -618,7 +618,7 @@ func (p *ConnPool) rpc(dc string, nodeName string, addr net.Addr, method string,
} }
p.releaseConn(conn) p.releaseConn(conn)
return fmt.Errorf("rpc error making call: %v", err) return fmt.Errorf("rpc error making call: %w", err)
} }
// Done with the connection // Done with the connection