test(http2): drain client traffic after sending GOAWAY (#50972)

Co-authored-by: mateo <277851410+mateo-berri@users.noreply.github.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
devin-ai-integration[bot] 2026-11-10 18:31:57 +00:00 • committed by GitHub
parent 43a4b465e9
commit 5299914964
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -531,6 +531,9 @@ def _serve_h2(context: ssl.SSLContext, raw: socket.socket, drain: bool) -> None:
tls.sendall(connection.data_to_send())
while data := tls.recv(65535):
if _reply_to_ended_streams(connection, tls, data, drain) and drain:
tls.shutdown(socket.SHUT_WR)
while tls.recv(65535):
pass
return