Skip to content

Commit 4e66fe5

Browse files
authored
Merge pull request fhessel#59 from quentin/frame-length-issue
fix Websocket sent frame length
2 parents 31a7f86 + 036420d commit 4e66fe5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/WebsocketHandler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ void WebsocketHandler::send(uint8_t* data, uint16_t length, uint8_t sendType) {
238238
frame.len = 126;
239239
_con->writeBuffer((uint8_t *)&frame, sizeof(frame));
240240
uint16_t net_len = htons(length);
241-
_con->writeBuffer((uint8_t *) net_len, sizeof(uint16_t)); // Convert to network byte order from host byte order
241+
_con->writeBuffer((uint8_t *)&net_len, sizeof(uint16_t)); // Convert to network byte order from host byte order
242242
}
243243
_con->writeBuffer(data, length);
244244
HTTPS_LOGD("<< Websocket.send()");

0 commit comments

Comments
 (0)