Retrofit API call receives “HTTP FAILED: java.io.IOException: Canceled”

前端 未结 4 957
难免孤独
难免孤独 2021-01-01 09:58

Can\'t figure out why is this happening. Neither one of rx callbacks (onCompleted(), onError(), onNext()) not gets triggered by my call. The only thing i receive is this okh

4条回答
  •  时光取名叫无心
    2021-01-01 10:10

    Thanks to @Kiskae. This gave me the correct hint. In my case I used a CompositeSubscription and added a subscription to it after it was unsubscribed by another method.

    /**
     * Adds a new {@link Subscription} to this {@code CompositeSubscription} if the
     * {@code CompositeSubscription} is not yet unsubscribed. If the {@code CompositeSubscription} is
     * unsubscribed, {@code add} will indicate this by explicitly unsubscribing the new {@code Subscription} as
     * well.
     *
     * @param s
     *         the {@link Subscription} to add
     */
    

提交回复
热议问题