Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Update SinkSubscriber to read error message on netty thread #77

Merged
merged 1 commit into from
Apr 28, 2017

Conversation

BenWhitehead
Copy link
Contributor

SinkSubscriber has had it's pipeline slightly changed to ensure that
when trying to read an error message response body that it is able to do
so. The ByteBuf from response.getContent() has it's ref-counter
automatically decremented when the response object leaves the netty
thread and results in the content being disposed. When SinkSubscriber
would then attempt to read the content to construct the error message
it would fail.

This change moves to logic of reading and mapping over the content
before we move to the compute thread to invoke the callback on the
SinkOperation.

See ReactiveX/RxNetty#264
Fixes #73

SinkSubscriber has had it's pipeline slightly changed to ensure that
when trying to read an error message response body that it is able to do
so. The `ByteBuf` from `response.getContent()` has it's ref-counter
automatically decremented when the response object leaves the netty
thread and results in the content being disposed. When SinkSubscriber
would then attempt to read the content to construct the error message
it would fail.

This change moves to logic of reading and mapping over the content
before we move to the compute thread to invoke the callback on the
`SinkOperation`.

See ReactiveX/RxNetty#264
@BenWhitehead BenWhitehead added this to the 0.1.2 milestone Apr 28, 2017
@BenWhitehead BenWhitehead merged commit 1b17fbb into d2iq-archive:master Apr 28, 2017
@BenWhitehead BenWhitehead deleted the fix-73 branch April 28, 2017 23:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant