Skip to content

Commit

Permalink
Check and return a missed error.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffall committed Aug 20, 2013
1 parent b6490bb commit 133aa78
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mqtt.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ func DecodeOneMessage(r io.Reader, config DecoderConfig) (msg Message, err error
var msgType MessageType
var packetRemaining int32
msgType, packetRemaining, err = hdr.Decode(r)
if err != nil {
return
}

msg, err = NewMessage(msgType)
if err != nil {
Expand Down

0 comments on commit 133aa78

Please sign in to comment.