Fix memory leak when using ktor-client-java (#4637)

This commit is contained in:
Lauri Tulmin 2021-11-16 02:09:02 +02:00 committed by GitHub
parent 6063a16f54
commit 35a1aa7da2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ public class BodyHandlerWrapper<T> implements BodyHandler<T> {
if (subscriber instanceof BodySubscriberWrapper) {
return subscriber;
}
return new BodySubscriberWrapper<>(delegate.apply(responseInfo), context);
return new BodySubscriberWrapper<>(subscriber, context);
}
public static class BodySubscriberWrapper<T> implements BodySubscriber<T> {