-
Notifications
You must be signed in to change notification settings - Fork 21
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
Is access denied recoverable? #96
Comments
They should behave the same as any other non-
I don't see this happening in practice.
|
Ok, this does mean that some access denied errors are recoverable and some are not, depending on which state they are thrown in, it might help to add some clarification on this noting it is permitted. |
Doesn't this naturally follow from the state diagram? I'd rather not add a clarification specifically for |
I added a generic remark to the documentation of Bind: e4febb3 without reference to any specific error codes. WDYT? |
Hmm, the question is more - can |
(and if the answer is yes, we certainly don't need further clarification as it comes from the state machine as you say, but from an implementation perspective I'm just implementing a simple generic sync check in |
Ah, I see. Yes, both are equally correct. See update: 99325cf In preview3+ this distinction between start and finish won't exist at all anymore. |
Thinking about this some more, due to the distinction between recoverability and non-recoverability I do think we need to state quite explicitly that Alternatively we need to define recoverability for finish errors. |
So even when there is async, there is still the distinction between transitioning to the in-progress state, versus not, and errors can still fall on both sides of that. |
There is no distinction. Either something fails or it doesn't. The only special case is |
There very much is a distinction - whether that failure transitions the socket into the closed state or retains the current state. Are you saying that all I have found this can be done comprehensively for Just trying to be sure I've implemented the right thing myself - nothing more, nothing less. |
I completely understand.
Fair point. No, those are indeed not terminal and they do not cause a state transition. This is described in the section "Not shown in the diagram":
So a more correct statement would be: when a method is called from the correct state, there is no distinction between error codes (other than
Those are regular errors. So non-terminal for bind, terminal for connect & listen, etc. |
I think the only cases to clarify then are: (1) |
Yes it can
Very likely, but the spec doesn't require this. |
Treating the exact state transition behaviours in errors as implementation specific seems fine to me (ie whether the socket state transition occurs before or after throwing the error). The only risk I see here is implementations that rely on errors that retain the state in one implementation then not working in another. But I guess in reality creating a new socket is just the best way to handle that anyway so treating it as somewhat unspecified doesn't seem overly problematic. |
Specifically should permissions errors transition back into the previous state before the
*-in-progress
state, or should they always move to the terminalclosed
state?The text was updated successfully, but these errors were encountered: