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

rewrite protocol check with switch-case in daemon #2483

Closed
wants to merge 2 commits into from

Conversation

@hamo
Copy link
Contributor

hamo commented Oct 31, 2013

ping @crosbymichael @shykes @vieux

Please review. Thanks.

@shykes

This comment has been minimized.

Copy link
Contributor

shykes commented Oct 31, 2013

Won't this fail if unlink is successful?

@hamo

This comment has been minimized.

Copy link
Contributor Author

hamo commented Oct 31, 2013

@shykes
func isNotExist(err error) bool {
switch pe := err.(type) {
case nil:
return false
case *PathError:
err = pe.Err
case *LinkError:
err = pe.Err
}
return err == syscall.ENOENT || err == ErrNotExist
}
So if err == nil, this will return false.
Great catch. This is my fault. Will update now.

@vieux

This comment has been minimized.

Copy link
Contributor

vieux commented Nov 1, 2013

@hamo please rebase

@hamo

This comment has been minimized.

Copy link
Contributor Author

hamo commented Nov 1, 2013

@vieux I will rebase and send a new pull request.

@hamo hamo closed this Nov 1, 2013
@vieux vieux reopened this Nov 1, 2013
@vieux

This comment has been minimized.

Copy link
Contributor

vieux commented Nov 1, 2013

@hamo please learn how to rebase, you can open a new PR each time. Thanks

@hamo

This comment has been minimized.

Copy link
Contributor Author

hamo commented Nov 1, 2013

@vieux I have opened a new PR #2502 . Please review. Thanks.

@vieux vieux closed this Nov 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.