diff options
author | David M. Lee <dlee@digium.com> | 2015-02-25 20:47:39 +0000 |
---|---|---|
committer | David M. Lee <dlee@digium.com> | 2015-02-25 20:47:39 +0000 |
commit | ff642289f42774b6f185f8cec0b643f1e92368ca (patch) | |
tree | f6ddaae3cd03fa884b0bb961a181dfb483e0288e /menuselect/menuselect.c | |
parent | 57525c3cf2df8f48d9e8d647ea722494b42461f5 (diff) |
Increase WebSocket frame size and improve large read handling
Some WebSocket applications, like [chan_respoke][], require a larger
frame size than the default 8k; this patch bumps the default to 16k.
This patch also fixes some problems exacerbated by large frames.
The sanity counter was decremented on every fread attempt in
ws_safe_read(), regardless of whether data was read from the socket or
not. For large frames, this could result in loss of sanity prior to
reading the entire frame. (16k frame / 1448 bytes per segment = 12
segments).
This patch changes the sanity counter so that it only decrements when
fread() doesn't read any bytes. This more closely matches the original
intention of ws_safe_read(), given that the error message is
"Websocket seems unresponsive".
This patch also properly logs EOF conditions, so disconnects are no
longer confused with unresponsive connections.
[chan_respoke]: https://github.com/respoke/chan_respoke
Review: https://reviewboard.asterisk.org/r/4431/
........
Merged revisions 432236 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 432237 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432238 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'menuselect/menuselect.c')
0 files changed, 0 insertions, 0 deletions