[Asterisk-code-review] res_http_websocket.c: Continue reading after ping/pong (asterisk[master])
Friendly Automation
asteriskteam at digium.com
Tue Jul 7 09:04:02 CDT 2020
Friendly Automation has submitted this change. ( 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(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Friendly Automation: Approved for Submit
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: 3
Gerrit-Owner: Nickolay V. Shmyrev <nshmyrev at alphacephei.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200707/1327a0b5/attachment-0001.html>
More information about the asterisk-code-review
mailing list