public void readWindowUpdateFrame()

in src/main/java/com/twitter/http2/HttpConnectionHandler.java [525:550]


    public void readWindowUpdateFrame(int streamId, int windowSizeIncrement) {
        // HTTP/2 WINDOW_UPDATE frame processing requirements:
        //
        // Receivers of a WINDOW_UPDATE that cause the window size to exceed 2^31
        // must send a RST_STREAM with the status code FLOW_CONTROL_ERROR.
        //
        // Sender should ignore all WINDOW_UPDATE frames associated with a stream
        // after sending the last frame for the stream.

        // Ignore frames for half-closed streams
        if (streamId != HTTP_CONNECTION_STREAM_ID && httpConnection.isLocalSideClosed(streamId)) {
            return;
        }

        // Check for numerical overflow
        if (httpConnection.getSendWindowSize(streamId) > Integer.MAX_VALUE - windowSizeIncrement) {
            if (streamId == HTTP_CONNECTION_STREAM_ID) {
                issueConnectionError(HttpErrorCode.PROTOCOL_ERROR);
            } else {
                issueStreamError(streamId, HttpErrorCode.FLOW_CONTROL_ERROR);
            }
            return;
        }

        updateSendWindowSize(context, streamId, windowSizeIncrement);
    }