[Asterisk-code-review] res_http_websocket.c: Continue reading after ping/pong (asterisk[master])
Nickolay V. Shmyrev
asteriskteam at digium.com
Mon Jun 22 12:19:38 CDT 2020
Nickolay V. Shmyrev has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/14570 )
Change subject: res_http_websocket.c: Continue reading after ping/pong
......................................................................
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
---
M res/res_http_websocket.c
1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/70/14570/1
diff --git a/res/res_http_websocket.c b/res/res_http_websocket.c
index 5d14ac6..fdcb0d9 100644
--- a/res/res_http_websocket.c
+++ b/res/res_http_websocket.c
@@ -1452,6 +1452,12 @@
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) {
continue;
}
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14570
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I4d06b4827bd71e56cbaafc011ffdcef9f0332922
Gerrit-Change-Number: 14570
Gerrit-PatchSet: 1
Gerrit-Owner: Nickolay V. Shmyrev <nshmyrev at alphacephei.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200622/06e545a1/attachment-0001.html>
More information about the asterisk-code-review
mailing list