Skip to content

fix(nanopush): panic on nil, and unbounded goroutine spawning#250

Open
MagnusHJensen wants to merge 2 commits intomicromdm:mainfrom
MagnusHJensen:fix-push-panic-and-concurrency
Open

fix(nanopush): panic on nil, and unbounded goroutine spawning#250
MagnusHJensen wants to merge 2 commits intomicromdm:mainfrom
MagnusHJensen:fix-push-panic-and-concurrency

Conversation

@MagnusHJensen
Copy link
Copy Markdown
Contributor

This PR fixes two issues:

  1. Panic on nil pushInfo when pushing more than one deviceInfo (inside the pushConcurrent), and fixes it by not pushing a job if the pushInfo is nil.
  2. The check logic was flipped to determine how many workers to spawn, rendering the preset worker boundary useless, if more pushInfo came through, it would spawn X amount of workers, now it caps at the workers boundary, or downsizes if less than that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant