Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

Commit

Permalink
Fix panic in monitor when downlink is rejected
Browse files Browse the repository at this point in the history
  • Loading branch information
htdvisser committed Jan 30, 2017
1 parent 0002688 commit 205391d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/broker/downlink.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ func (b *broker) HandleDownlink(downlink *pb.DownlinkMessage) error {
} else {
ctx.WithField("Duration", time.Now().Sub(start)).Info("Handled downlink")
}
for _, monitor := range b.Monitors.BrokerClients() {
ctx.Debug("Sending downlink to monitor")
go monitor.SendDownlink(downlink)
if downlink != nil {
for _, monitor := range b.Monitors.BrokerClients() {
ctx.Debug("Sending downlink to monitor")
go monitor.SendDownlink(downlink)
}
}
}()

Expand Down

0 comments on commit 205391d

Please sign in to comment.