[asterisk-bugs] [JIRA] (ASTERISK-26842) Websocket becomes disconnected when trying to place call from browser

Mark Michelson (JIRA) noreply at issues.asterisk.org
Tue Mar 7 13:40:10 CST 2017


Mark Michelson created ASTERISK-26842:
-----------------------------------------

             Summary: Websocket becomes disconnected when trying to place call from browser
                 Key: ASTERISK-26842
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26842
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Resources/res_http_websocket
    Affects Versions: GIT
            Reporter: Mark Michelson


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.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list