mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
ws: make sure we understand frame finished when buflist_out flushed
When lws_write as many bytes as user can until function returns not all sent, the next user`s lws_write call will write wrong frame to the other end. This will cause connection be close by the other side.
This commit is contained in:
parent
0e94683897
commit
eb9c01ae5c
1 changed files with 5 additions and 0 deletions
|
@ -172,6 +172,11 @@ lws_issue_raw(struct lws *wsi, unsigned char *buf, size_t len)
|
|||
-1 : (int)real_len;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#if defined(LWS_ROLE_WS)
|
||||
/* Since buflist_out flushed, we're not inside a frame any more */
|
||||
if (wsi->ws)
|
||||
wsi->ws->inside_frame = 0;
|
||||
#endif
|
||||
}
|
||||
/* always callback on writeable */
|
||||
|
|
Loading…
Add table
Reference in a new issue