Skip to content

RxJava2 bridge doesn't forward all events #1635

@margelatu

Description

@margelatu

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions