Skip to content

Commit

Permalink
Add missing return in lock handler request decoding
Browse files Browse the repository at this point in the history
* If a request message can't be decoded, a Reply indicating
and error should be returned without continuing
  • Loading branch information
dghubble committed Oct 25, 2020
1 parent 7d282f0 commit 344c7f0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ func (s *Server) lock(w http.ResponseWriter, req *http.Request) {
if err != nil {
s.log.Errorf("fleetlock: error decoding message: %v", err)
encodeReply(w, NewReply(KindDecodeError, "error decoding message"))
return
}
id := msg.ClientParmas.ID
group := msg.ClientParmas.Group
Expand Down

0 comments on commit 344c7f0

Please sign in to comment.