Summary: | ASTERISK-26842: Websocket becomes disconnected when trying to place call from browser | ||
Reporter: | Mark Michelson (mmichelson) | Labels: | |
Date Opened: | 2017-03-07 13:39:41.000-0600 | Date Closed: | 2017-03-08 10:06:25.000-0600 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Resources/res_http_websocket |
Versions: | GIT | Frequency of Occurrence | Constant |
Related Issues: | |||
Environment: | Attachments: | ||
Description: | When using a WebRTC SIP client (Firefox browser, SIPml5 demo), I noticed that I could register, but when I would attempt to call, I would see
{noformat} [Mar 7 19:24:26] WARNING[3005]: res_http_websocket.c:526 ws_safe_read: Websocket seems unresponsive, disconnecting ... [Mar 7 19:24:26] ERROR[3005]: tcptls.c:744 ast_tcptls_close_session_file: ast_tcptls_close_session_file invoked on session instance without file or file descriptor {noformat} After investigating further, I found that the issue was centered around a coding error introduced to res_http_websocket.c when the iostreams change was merged. The problem was that on an EINTR read from the websocket, the expected length was being adjusted as if a partial read had occurred. By adding a simple if block around the expected length adjustment, the problem is bypassed and websockets work fine. | ||
Comments: | By: Friendly Automation (friendly-automation) 2017-03-08 10:06:26.420-0600 Change 5137 merged by zuul: res_http_websocket: Fix faulty read logic. [https://gerrit.asterisk.org/5137|https://gerrit.asterisk.org/5137] |