Skip to content
Snippets Groups Projects
Commit a700134f authored by Nickolay Shmyrev's avatar Nickolay Shmyrev Committed by George Joseph
Browse files

res_http_websocket.c: Continue reading after ping/pong

Do not return error if the client received ping frame
while looking for a string and just wait for another frame.

ASTERISK-28958 #close

Change-Id: I4d06b4827bd71e56cbaafc011ffdcef9f0332922
parent c3561879
Branches
Tags
No related merge requests found
...@@ -1452,6 +1452,12 @@ int AST_OPTIONAL_API_NAME(ast_websocket_read_string) ...@@ -1452,6 +1452,12 @@ int AST_OPTIONAL_API_NAME(ast_websocket_read_string)
return -1; return -1;
} }
if (opcode == AST_WEBSOCKET_OPCODE_PING) {
/* Try read again, we have sent pong already */
fragmented = 1;
continue;
}
if (opcode == AST_WEBSOCKET_OPCODE_CONTINUATION) { if (opcode == AST_WEBSOCKET_OPCODE_CONTINUATION) {
continue; continue;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment