private void onGoAway(GoAwayFrame frame) {
   if (goAwayReceived.compareAndSet(false, true)) {
     // TODO: Find a better name for GoAwayResultInfo
     GoAwayResultInfo goAwayResultInfo =
         new GoAwayResultInfo(frame.getLastStreamId(), SessionStatus.from(frame.getStatusCode()));
     notifyOnGoAway(listener, goAwayResultInfo);
     flush();
     // 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.
   }
 }