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

RESTEASY-3046 with other test fixes #2970

Merged
merged 4 commits into from Nov 25, 2021
Merged

Conversation

jamezp
Copy link
Contributor

@jamezp jamezp commented Nov 24, 2021

Combined fix as the first commit seems to trigger the others failing more. Combining them just seemed correct.

Upstream #2968

…not reset the current AsyncOperation if it has not been complete.

https://issues.redhat.com/browse/RESTEASY-3046
Signed-off-by: James R. Perkins <jperkins@redhat.com>
… wait times and massive amounts of events.

https://issues.redhat.com/browse/RESTEASY-3053
Signed-off-by: James R. Perkins <jperkins@redhat.com>
@jamezp jamezp merged commit b661f83 into resteasy:4.7 Nov 25, 2021
@@ -65,10 +65,10 @@ protected void doWork(ServletOutputStream sos)
{
try
{
stream.write(bytes, offset, length);
// we only are complete if isReady says we're good to write, otherwise
// we will be complete in the next onWritePossible or onError
if(sos == null || sos.isReady()) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jamezp This seems to fix the issue 👍, but just a question though if the condition becomes false then would it never complete as we no long complete on outside of doWork and we dont process in onFlush until lastAsyncOperation is complete?

And sorry about the delay, I wasn't able to check this last week.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries at all @anthochristen. I guess things may never complete if onWritePossible() or onError() are not called. However, attempting to write outside of the check doesn't make much sense if sos.isReady() returns false as it would throw an exception since the stream is not ready.

I can't really think of a scenario where it wouldn't complete though. If you've got a scenario though I'm definitely interested and we can look at how to fix that.

@jamezp jamezp deleted the RESTEASY-3046-4.x branch November 30, 2021 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants