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

RxJava2 bridge doesn't forward all events #1635

Closed
margelatu opened this issue Jun 1, 2019 · 2 comments
Closed

RxJava2 bridge doesn't forward all events #1635

margelatu opened this issue Jun 1, 2019 · 2 comments
Milestone

Comments

@margelatu
Copy link
Contributor

When using the RxJava2 client, the AsyncHandler implementation provided by the client code is wrapped in a bridge, see https://github.com/AsyncHttpClient/async-http-client/blob/master/extras/rxjava2/src/main/java/org/asynchttpclient/extras/rxjava2/DefaultRxHttpClient.java#L71

The bridge is an instance of MaybeAsyncHandlerBridge or of ProgressAsyncMaybeEmitterBridge. Irrespective of which of the two classes the bridge instance belong to, most of the events that are part of the AsyncHandler interface are not forwarded to the underlying AsyncHandler implementation. This includes events like onRequestSend or onRetry, making it impossible for users of the RxClient to handle them without rewriting the whole client.

The problem is in AbstractMaybeAsyncHandlerBridge, which does not forward these events.

margelatu added a commit to margelatu/async-http-client that referenced this issue Jun 1, 2019
* updated AbstractMaybeAsyncHandlerBridge to forward all events to the delegate AsyncHandler
@margelatu
Copy link
Contributor Author

Opened PR #1636 to address this issue.

@slandelle : could you please review this? Thank you!

@slandelle slandelle added this to the 2.10.0 milestone Jun 3, 2019
@slandelle
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants