mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-16 00:00:07 +01:00
Fix corruption of close reason code in close frame
According to specification, close reason code is part of body
This commit is contained in:
parent
38f3225b22
commit
b2c3ba03c4
1 changed files with 0 additions and 1 deletions
|
@ -337,7 +337,6 @@ LWS_VISIBLE int lws_write(struct lws *wsi, unsigned char *buf,
|
|||
|
||||
if (wsi->u.ws.close_reason) {
|
||||
/* reason codes count as data bytes */
|
||||
buf -= 2;
|
||||
buf[0] = (unsigned char)(wsi->u.ws.close_reason >> 8);
|
||||
buf[1] = (unsigned char)wsi->u.ws.close_reason;
|
||||
len += 2;
|
||||
|
|
Loading…
Add table
Reference in a new issue