Skip to content

Commit

Permalink
client: log every incoming response (#409)
Browse files Browse the repository at this point in the history
  • Loading branch information
aler9 authored Sep 10, 2023
1 parent 4495e7d commit dfa09dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,8 @@ func (c *Client) runInner() error {
c.reader = nil
return err

case <-c.chReadResponse:
case res := <-c.chReadResponse:
c.OnResponse(res)
return liberrors.ErrClientUnexpectedResponse{}

case req := <-c.chReadRequest:
Expand Down Expand Up @@ -612,6 +613,7 @@ func (c *Client) waitResponse() (*base.Response, error) {
return nil, err

case res := <-c.chReadResponse:
c.OnResponse(res)
return res, nil

case req := <-c.chReadRequest:
Expand Down Expand Up @@ -916,8 +918,6 @@ func (c *Client) do(req *base.Request, skipResponse bool) (*base.Response, error
return nil, err
}

c.OnResponse(res)

// get session from response
if v, ok := res.Header["Session"]; ok {
var sx headers.Session
Expand Down

0 comments on commit dfa09dd

Please sign in to comment.