Skip to content

Commit

Permalink
Fix panic when discovery doesn't send an ok message after a command (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
silvanocerza committed Nov 25, 2021
1 parent dbdca99 commit df27d56
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arduino/discovery/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ func (disc *PluggableDiscovery) jsonDecodeLoop(in io.Reader, outChan chan<- *dis
// This is fine, we exit gracefully
disc.statusMutex.Lock()
disc.state = Dead
disc.incomingMessagesError = err
disc.statusMutex.Unlock()
close(outChan)
return
Expand Down

0 comments on commit df27d56

Please sign in to comment.