[asterisk-bugs] [JIRA] (ASTERISK-28231) res_http_websocket: Not responding to Connection Close Frame (opcode 8)

Jeremy Lainé (JIRA) noreply at issues.asterisk.org
Thu Jan 3 10:07:47 CST 2019


     [ https://issues.asterisk.org/jira/browse/ASTERISK-28231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeremy Lainé updated ASTERISK-28231:
------------------------------------

    Attachment: test-ws.py

Running the attached script against Asterisk results in:

DEBUG:asyncio:Using selector: EpollSelector
DEBUG:websockets.protocol:client - state = CONNECTING
DEBUG:websockets.protocol:client - event = connection_made(<_SelectorSocketTransport fd=6 read=idle write=<idle, bufsize=0>>)
DEBUG:websockets.protocol:client - state = OPEN
DEBUG:websockets.protocol:client - state = CLOSING
DEBUG:websockets.protocol:client > Frame(fin=True, opcode=8, data=b'\x03\xe8', rsv1=False, rsv2=False, rsv3=False)

<- LONG WAIT HERE ->

DEBUG:websockets.protocol:client ! timed out waiting for TCP close
DEBUG:websockets.protocol:client x half-closing TCP connection
DEBUG:websockets.protocol:client ! timed out waiting for TCP close
DEBUG:websockets.protocol:client x closing TCP connection
DEBUG:websockets.protocol:client - event = connection_lost(None)
DEBUG:websockets.protocol:client - state = CLOSED
DEBUG:websockets.protocol:client x code = 1006, reason = [no reason]

> res_http_websocket: Not responding to Connection Close Frame (opcode 8)
> -----------------------------------------------------------------------
>
>                 Key: ASTERISK-28231
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28231
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_http_websocket
>    Affects Versions: 16.0.1
>            Reporter: Jeremy Lainé
>         Attachments: test-ws.py
>
>
> Asterisk's WebSocket implementation does not seem to respond to opcode 8, meaning that a client client which tries to close the WebSocket ends up hanging forever.
> I can reproduce this 100% against Asterisk 16.0.1 using a trivial Python script.



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



More information about the asterisk-bugs mailing list