use of io.servicetalk.transport.netty.internal.WriteStreamSubscriber.AbortedFirstWriteException in project servicetalk by apple.
the class DefaultNettyConnection method enrichError.
private Throwable enrichError(final Throwable t) {
Throwable throwable;
CloseEvent closeReason;
if (t instanceof AbortedFirstWriteException) {
if ((closeReason = this.closeReason) != null) {
throwable = new RetryableClosedChannelException(wrapWithCloseReason(closeReason, t.getCause()));
} else if (t.getCause() instanceof RetryableException) {
// Unwrap additional layer of RetryableException if the cause is already retryable
throwable = t.getCause();
} else if (t.getCause() instanceof ClosedChannelException) {
throwable = new RetryableClosedChannelException((ClosedChannelException) t.getCause());
} else {
throwable = t;
}
} else if (t instanceof RetryableClosedChannelException) {
throwable = t;
} else {
if ((closeReason = this.closeReason) != null) {
throwable = wrapWithCloseReason(closeReason, t);
} else {
throwable = enrichProtocolError.apply(t);
}
}
transportError.onSuccess(throwable);
return throwable;
}
Aggregations