-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Use named error return for initProcess#start #2238
Conversation
7b64d10
to
a230cbd
Compare
/cc @mrunalp |
The deferred func starting line 352 is duplicate with the one starting line 304. I think the second deferred func can be removed. |
What happens is that the second deferred func is ineffective. I will drop the second deferred func. |
a230cbd
to
b56cc49
Compare
@tedyu thanks for the patch! Coincidentally, I was looking into this part of code as well and ended up with a similar patch. Some discussion about the code is provided at #1916 (review) (also, this is a PR to blame) and yet it doesn't explain the double defer. I think the defer needs to be moved up a bit (before @crosbymichael @giuseppe PTAL |
@AkihiroSuda ptal |
@kolyshkin |
@kolyshkin |
@crosbymichael ptal 🤗 |
@crosbymichael @thaJeztah Thanks |
I'm not a maintainer in this repository; @AkihiroSuda @mrunalp PTAL? |
Signed-off-by: zyu <[email protected]>
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.
LGTM
/lgtm
@mrunalp thanks |
Thanks @AkihiroSuda |
Please use your full name next time |
In initProcess#start, there is deferred func :
Since the error return is not named, the above check doesn't cover all the cases.
e.g. a few lines below:
The check in deferred func doesn't check either err or, the actual returned error.
This PR changes the error return to be named.