Skip to content

Commit 48116a8

Browse files
authored
Merge pull request Lawouach#186 from plu9in/Fix_bug_RFC6455_unfragmented_message
Eliminate a protocol error when first chunk is last too.
2 parents 0accb6b + 307b2df commit 48116a8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ws4py/websocket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ def send(self, payload, binary=False):
314314
bytes = chunk
315315
first = False
316316

317-
self._write(message_sender(bytes).fragment(last=True, mask=self.stream.always_mask))
317+
self._write(message_sender(bytes).fragment(first=first, last=True, mask=self.stream.always_mask))
318318

319319
else:
320320
raise ValueError("Unsupported type '%s' passed to send()" % type(payload))

0 commit comments

Comments
 (0)