Skip to content

Commit

Permalink
fixed eof handling in request and response decoder
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian committed Mar 27, 2020
1 parent 92049dc commit 4cfc510
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion reqest.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func (d *RequestDecoder) Decode(data io.Writer) (*Request, error) {
// when we read from a stream, we may get an EOF if we want to read the end tag
// all data should be read and we can ignore the error
if err == io.EOF {
return req, nil
break
}
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion response.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func (d *ResponseDecoder) Decode(data io.Writer) (*Response, error) {
// when we read from a stream, we may get an EOF if we want to read the end tag
// all data should be read and we can ignore the error
if err == io.EOF {
return resp, nil
break
}
return nil, err
}
Expand Down

0 comments on commit 4cfc510

Please sign in to comment.