-
Notifications
You must be signed in to change notification settings - Fork 1.6k
False timeouts when using StreamedAsyncHandler #1721
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
Comments
Sure. |
@slandelle do you have any concerns about backwards compatibility or should I just add it to the existing |
Not on the reactive-streams features. Those are quite experimental (originally contributed by Lightbend, then nobody ever answered my questions). |
Opened #1723 |
@slandelle when will this change make it into a release? |
When using the
StreamedAsyncHandler
to download large files, I found what I think is a bug in how timeouts are handled.The timeout mechanism relies on when the
ListenableFuture
for the request was lasttouch()
ed.touch()
is only called when aHttpResponseBodyPart
is delivered to the downstream. This works fine if the downstream is downloading the response as fast as possible.However, if the downstream has no outstanding
request()
(like if it's serving as a proxy and its own downstream is slow or whatever), there may be long periods of time where there are no body parts published because none have been requested. In those periods, the request may "time out" because of inactivity.I think we should change the timeout logic to only count this as a timeout if there has been no activity AND there is no outstanding request on the
Publisher
. This can be implemented by periodicallytouch()
ing theListenableFuture
if there is no outstandingrequest()
on thePublisher
.I am willing to implement it if we want this feature.
The text was updated successfully, but these errors were encountered: