Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@igor-sirotin reported the following error:
panic: send on closed channel
Since this is happening because the channel is closed when the context is done, and the publish function is still being executed, attempting to add a message to the queue. To avoid this error, i just remove the need to close this channel, since it will be garbage collected eventually, since it will determine the channel to be unreachable will have its resources reclaimed whether or not it is closed, and also made Push and Pop functions cancelable by passing a context
Required to fix status-im/status-go#5661