[Asterisk-code-review] res_http_websocket.c: Continue reading after ping/pong (asterisk[13])
Friendly Automation
asteriskteam at digium.com
Tue Jul 7 08:54:07 CDT 2020
Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/14642 )
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
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 9e9f4f1..541c22f 100644
--- a/res/res_http_websocket.c
+++ b/res/res_http_websocket.c
@@ -1434,6 +1434,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/+/14642
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I4d06b4827bd71e56cbaafc011ffdcef9f0332922
Gerrit-Change-Number: 14642
Gerrit-PatchSet: 2
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-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200707/6dc8bb3f/attachment-0001.html>
More information about the asterisk-code-review
mailing list