Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix panic when no channel is present #3

Merged
merged 1 commit into from
Nov 16, 2021
Merged

Fix panic when no channel is present #3

merged 1 commit into from
Nov 16, 2021

Conversation

ui-kreinhard
Copy link
Collaborator

  • This will cause a panic
  • Return an appropiate error instead

channel.go Outdated
@@ -205,7 +205,9 @@ func (ch *Channel) PublishJSON(exchange, key string, mandatory, immediate bool,

func (ch *Channel) PublishJsonAndWaitForResponse(replyQueueName, correlationId string, response, request interface{}, exchange, key string, mandatory, immediate bool, responseTimeout time.Duration) error {
defer ch.ch.Cancel(replyQueueName+".consumer", false)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be better after nil check

* This will cause a panic
* Return an appropiate error instead
@nexoscp nexoscp merged commit fa1630c into master Nov 16, 2021
@BuJo BuJo deleted the fix_panic_nil branch March 26, 2024 14:20
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.

2 participants