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
[UNDERTOW-1618][UNDERTOW-1619][UNDERTOW-1620] Fix issues with abstract framed channels #827
Conversation
This is ok to test |
while (allAreSet(state, STATE_READS_RESUMED) && allAreClear(state, STATE_CLOSED | STATE_STREAM_BROKEN) && moreData); | ||
} finally { | ||
} while (readAgain); | ||
} catch (RuntimeException e) { |
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.
We might want to be cautious here and handle errors just in case.
} catch (RuntimeException e) { | |
} catch (RuntimeException | Error e) { |
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.
+1, I'll incorporate this change
taskRunQueue.poll().run(); | ||
Runnable runnable; | ||
while ((runnable = taskRunQueue.poll()) != null) { | ||
runnable.run(); |
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.
Looks like there's one more instance of this pattern on newFrames
in void flushSenders()
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.
Good catch! I created https://issues.jboss.org/browse/UNDERTOW-1621 and I'll add a fix for this in this PR.
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.
Thanks!
…_AWAKEN state, and synchronize read internal task in a way to prevent a wakeupReads() call being ignored in specific race condition scenarios
…STATE_CLOSED at AbstractFramedStreamSourceChannel.lastFrame
…ints that run taskRunQueue if they run concurrently
…en polling newFrames
cb74b76
to
fc3ef4e
Compare
Jiras: https://issues.jboss.org/browse/UNDERTOW-1618
https://issues.jboss.org/browse/UNDERTOW-1619
https://issues.jboss.org/browse/UNDERTOW-1620
https://issues.jboss.org/browse/UNDERTOW-1621