File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -599,12 +599,11 @@ def buffer_updated(self, nbytes: int) -> None:
599599 bytearray (self ._body_length - (self ._length + nbytes ) + 1024 )
600600 )
601601 self ._length += nbytes
602- if (
603- self ._length + self ._overflow_length >= self ._body_length
604- and self ._pending_messages
605- and not self ._pending_messages [0 ].done ()
606- ):
607- done = self ._pending_messages .popleft ()
602+ if self ._length + self ._overflow_length >= self ._body_length :
603+ if self ._pending_messages :
604+ done = self ._pending_messages .popleft ()
605+ else :
606+ done = asyncio .get_event_loop ().create_future ()
608607 done .set_result ((self ._start , self ._body_length ))
609608 self ._done_messages .append (done )
610609 if self ._length > self ._body_length :
You can’t perform that action at this time.
0 commit comments