Skip to content

Commit

Permalink
fix order of read debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
spali committed Jul 30, 2021
1 parent 0179d4a commit 803a076
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rscp/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,7 @@ func Read(mode *cipher.BlockMode, buf *[]byte, crcFlag *bool, frameSize *uint32,
r := bytes.NewReader((*buf)[RSCP_FRAME_HEADER_SIZE:])
var m []Message
// defer logging to also get the read data till errors
defer func() { log.Tracef("read plain %#v", *buf) }()
defer func() { log.Tracef("read %s", m) }()
defer func() { log.Tracef("read plain %#v", *buf); log.Tracef("read %s", m) }()
if err := read(r, &m, *dataSize); err != nil {
return nil, err
}
Expand Down

0 comments on commit 803a076

Please sign in to comment.