mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
Support empty ping and pong packets.
This commit is contained in:
parent
0c9563bbd2
commit
8977d5e513
1 changed files with 1 additions and 1 deletions
|
@ -311,7 +311,7 @@ LWS_VISIBLE int libwebsocket_write(struct libwebsocket *wsi, unsigned char *buf,
|
|||
int m;
|
||||
#endif
|
||||
|
||||
if (len == 0 && protocol != LWS_WRITE_CLOSE) {
|
||||
if (len == 0 && protocol != LWS_WRITE_CLOSE && protocol != LWS_WRITE_PING && protocol != LWS_WRITE_PONG) {
|
||||
lwsl_warn("zero length libwebsocket_write attempt\n");
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue