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

nsqd: fatal errors are not fatal #198

Merged
merged 1 commit into from
May 13, 2013

Conversation

mreiferson
Copy link
Member

shadowed var was hiding the following type check on the original error cc @jehiah

@mreiferson
Copy link
Member Author

😦

@@ -70,8 +70,7 @@ func (p *ProtocolV2) IOLoop(conn net.Conn) error {
}
log.Printf("ERROR: [%s] - %s%s", client, err.Error(), context)

err = p.Send(client, nsq.FrameTypeError, []byte(err.Error()))
if err != nil {
if err := p.Send(client, nsq.FrameTypeError, []byte(err.Error())); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

let's add a comment here, or use sendErr instead of err so it's a little more obvious what the expected behavior is.

@mreiferson
Copy link
Member Author

updated

@mreiferson
Copy link
Member Author

added test, too

jehiah added a commit that referenced this pull request May 13, 2013
@jehiah jehiah merged commit 178e369 into nsqio:master May 13, 2013
arussellsaw pushed a commit to arussellsaw/nsq that referenced this pull request Mar 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants