internal/jsonrpc2: fix bug in direction logging of call responses

Change-Id: Id2fe0caf49e68b01641dadbc9e801210ecbd464f
Reviewed-on: https://go-review.googlesource.com/c/tools/+/171021
Run-TryBot: Ian Cottrell <iancottrell@google.com>
Reviewed-by: Peter Weinberger <pjw@google.com>
This commit is contained in:
Ian Cottrell 2019-04-06 12:22:29 -04:00
parent 052fc3cfdb
commit 0d5674b311
1 changed files with 1 additions and 1 deletions

View File

@ -162,7 +162,7 @@ func (c *Conn) Call(ctx context.Context, method string, params, result interface
select { select {
case response := <-rchan: case response := <-rchan:
elapsed := time.Since(before) elapsed := time.Since(before)
c.Logger(Send, response.ID, elapsed, request.Method, response.Result, response.Error) c.Logger(Receive, response.ID, elapsed, request.Method, response.Result, response.Error)
// is it an error response? // is it an error response?
if response.Error != nil { if response.Error != nil {
return response.Error return response.Error