Skip to content

Commit

Permalink
skipping struct initialization when res is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
ghostec committed Feb 7, 2018
1 parent 11b5d3f commit 2fb29f7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions extensions/apns_push_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ func (p *APNSPushQueue) pushWorker() {
if err != nil {
l.WithError(err).Error("push error")
}
if res == nil {
continue
}
newRes := &structs.ResponseWithMetadata{
StatusCode: res.StatusCode,
Reason: res.Reason,
Expand Down

0 comments on commit 2fb29f7

Please sign in to comment.