mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-12 08:42:18 +00:00
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:
parent
43a4b465e9
commit
5299914964
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue