fix forward empty ws messages

This commit is contained in:
Alexander Prinzhorn 2021-07-09 17:42:27 +02:00 committed by Maximilian Hils
parent d93f1b77c1
commit 8c9c6d965b

View File

@ -228,8 +228,8 @@ class Fragmentizer:
def __call__(self, content: bytes) -> Iterator[wsproto.events.Message]:
if not content:
return
if len(content) == sum(self.fragment_lengths):
yield self.msg(content, True)
elif len(content) == sum(self.fragment_lengths):
# message has the same length, we can reuse the same sizes
offset = 0
for fl in self.fragment_lengths[:-1]: