You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So we have a complex situation. There are 2 types of EAGAIN error:
poll return value -1 which leads to io_poll to return -1 with initialized cause
poll return value 0 which leads to io_poll to return -1 with uninitialized cause
It is a little complex
I think we need to separate these 2 situations, because the second one is not a real error.
In my situation io_wait waits for SOCKS5 to recv few bytes, but SOCKS5 server might close the connection instead. In that situation there is no actual EAGAIN, so we should never wait again.
Either it should always initialize cause when returning EAGAIN and all callers should free it, or it should never initialize cause when returning EAGAIN and no callers should free it.
It doesn't really matter which but you will need to change io_polln to do the same thing whether poll actually returns EAGAIN or we pretend it does when poll returns 0 and there is no timeout, and then check all the callers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There is a bug on certain situations that cause remain uninitialized, fdm will show these lines on my OpenBSD:
This patch is to initialize cause on my situation (I didn't find any other uninitialized cause)