mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
websocket crashes fixed (#1258)
This commit is contained in:
parent
8dc4ff9a34
commit
b0e1510a78
@ -285,7 +285,7 @@ qint64 WebSocketClient::sendMessage(QJsonObject obj)
|
|||||||
quint64 position = i * FRAME_SIZE_IN_BYTES;
|
quint64 position = i * FRAME_SIZE_IN_BYTES;
|
||||||
quint32 frameSize = (payloadSize-position >= FRAME_SIZE_IN_BYTES) ? FRAME_SIZE_IN_BYTES : (payloadSize-position);
|
quint32 frameSize = (payloadSize-position >= FRAME_SIZE_IN_BYTES) ? FRAME_SIZE_IN_BYTES : (payloadSize-position);
|
||||||
|
|
||||||
QByteArray buf = makeFrameHeader(OPCODE::TEXT, frameSize, isLastFrame);
|
QByteArray buf = makeFrameHeader((i == 0) ? OPCODE::TEXT : OPCODE::CONTINUATION, frameSize, isLastFrame);
|
||||||
sendMessage_Raw(buf);
|
sendMessage_Raw(buf);
|
||||||
|
|
||||||
qint64 written = sendMessage_Raw(payload+position,frameSize);
|
qint64 written = sendMessage_Raw(payload+position,frameSize);
|
||||||
|
Loading…
Reference in New Issue
Block a user