-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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(pubsub): check both client errors on Close #2867
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving, but please see the comment about close semantics and address if necessary.
@hongalex I was debugging why I am getting I accidentally discovered there is a type in the error message at: this should be: func (c *Client) Close() error {
pubErr := c.pubc.Close()
subErr := c.subc.Close()
if pubErr != nil {
return fmt.Errorf("pubsub publisher closing error: %v", pubErr)
}
if subErr != nil {
return fmt.Errorf("pubsub subscriber closing error: %v", subErr)
}
return nil
} |
Should we detect |
Hey @xmlking, this error does occur with the emulator and the Btw, I noticed in the linked issue, there's a comment that says
Though I think the opposite is true (live pub/sub service will not throw this error). |
thanks @hongalex . fixed my type |
In #2624, we split the publisher and subscriber client's connection pool. Thus, we need to check both errors returned, rather than just the first one.