private void onGoAway(GoAwayFrame frame) { if (goAwayReceived.compareAndSet(false, true)) { GoAwayResultInfo goAwayResultInfo = new GoAwayResultInfo(frame.getLastStreamId(), SessionStatus.from(frame.getStatusCode())); notifyOnGoAway(listener, goAwayResultInfo); // SPDY does not require to send back a response to a GO_AWAY. // We notified the application of the last good stream id and // tried our best to flush remaining data. } }
@Override public boolean messageComplete() { if (stream == null) { assert content == null; if (headers.isEmpty()) proxyEngineSelector.onGoAway(session, new GoAwayResultInfo(0, SessionStatus.OK)); else syn(true); } else { stream.getStreamFrameListener().onData(stream, toDataInfo(content, true)); } return false; }