Allow zero-length pong to be received by server

Client code already allows zero-length pongs
This commit is contained in:
Andrejs Hanins 2015-12-01 14:44:33 +02:00 committed by Andy Green
parent abc8635824
commit 765914cab1

View file

@ -985,7 +985,8 @@ ping_drop:
LWS_EXT_CALLBACK_PAYLOAD_RX, &eff_buf, 0) < 0)
return -1;
if (eff_buf.token_len > 0) {
if (eff_buf.token_len > 0 ||
callback_action == LWS_CALLBACK_RECEIVE_PONG) {
eff_buf.token[eff_buf.token_len] = '\0';
if (wsi->protocol->callback) {