@Override protected void onCompleteFailure(Throwable x) { lease.recycle(); Throwable closed; Set<Entry> allEntries; synchronized (this) { closed = terminated; terminated = x; if (LOG.isDebugEnabled()) LOG.debug(String.format("%s, entries processed/pending/queued=%d/%d/%d", closed != null ? "Closing" : "Failing", processedEntries.size(), pendingEntries.size(), entries.size()), x); allEntries = new HashSet<>(entries); entries.clear(); } allEntries.addAll(processedEntries); processedEntries.clear(); allEntries.addAll(pendingEntries); pendingEntries.clear(); allEntries.forEach(entry -> entry.failed(x)); // If the failure came from within the // flusher, we need to close the connection. if (closed == null) session.abort(x); }
@Override protected void onCompleteFailure(Throwable x) { lease.recycle(); Throwable closed; Set<Entry> allEntries; synchronized (this) { closed = terminated; terminated = x; if (LOG.isDebugEnabled()) LOG.debug(String.format("%s, entries processed/pending/queued=%d/%d/%d", closed != null ? "Closing" : "Failing", processedEntries.size(), pendingEntries.size(), entries.size()), x); allEntries = new HashSet<>(entries); entries.clear(); } allEntries.addAll(processedEntries); processedEntries.clear(); allEntries.addAll(pendingEntries); pendingEntries.clear(); allEntries.forEach(entry -> entry.failed(x)); // If the failure came from within the // flusher, we need to close the connection. if (closed == null) session.abort(x); }
case REMOTELY_CLOSED: abort(new TimeoutException("Idle timeout " + endPoint.getIdleTimeout() + " ms")); return false;
case REMOTELY_CLOSED: abort(new TimeoutException("Idle timeout " + endPoint.getIdleTimeout() + " ms")); return false;
abort(new ClosedChannelException()); break;
abort(new ClosedChannelException()); break;