@Override protected void onIdleExpired(TimeoutException timeout) { StreamFrameListener listener = this.listener; if (listener != null) listener.onFailure(this, timeout); // The stream is now gone, we must close it to // avoid that its idle timeout is rescheduled. close(); }