Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

H2Connection.outbound_flow_control_window is not updated in the initial SETTINGS exchange #1240

Closed
drv1234 opened this issue Dec 15, 2020 · 1 comment

Comments

@drv1234
Copy link

drv1234 commented Dec 15, 2020

Hi,
as I see the H2Connection.outbound_flow_control_window is not updated in the initial SETTINGS exchange.
I put these lines after event handling loop:

           events = self.conn.receive_data(data)
            for event in events:
                if isinstance(event, ResponseReceived):
                    self.handle_response_received(event)
                elif isinstance(event, DataReceived):
                    self.handle_data_received(event)

:
:
data = self.conn.data_to_send()
if data:
self.writer.write(data)

            **print('self.conn.outbound_flow_control_window:', self.conn.outbound_flow_control_window)
            print('self.conn.remote_settings.initial_window_size:', self.conn.remote_settings.initial_window_size)**

and I see that self.conn.outbound_flow_control_window is not updated according to the initial SETTINGS frame but self.conn.remote_settings.initial_window_size is correct.

The result is that even the remote side can handle more data so does not send any WINDOW_UPDATE but the local peer will not send any data because it thinks that remote side is full

@drv1234
Copy link
Author

drv1234 commented Mar 29, 2021

Checking the source code and the RFC, it turned out it is not a bug.

def _flow_control_change_from_settings(self, old_value, new_value):
    """
    Update flow control windows in response to a change in the value of
    SETTINGS_INITIAL_WINDOW_SIZE.

    When this setting is changed, it automatically updates all flow control
    windows by the delta in the settings values. Note that it does not
    increment the *connection* flow control window, per section 6.9.2 of
    RFC 7540.
    """

@drv1234 drv1234 closed this as completed Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant