[asterisk-dev] [Code Review] 4412: res_http_websocket: websocket write timeout fails to fully disconnect underlying socket

Mark Michelson reviewboard at asterisk.org
Tue Feb 10 13:20:11 CST 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4412/#review14437
-----------------------------------------------------------

Ship it!



branches/13/res/ari/ari_websockets.c
<https://reviewboard.asterisk.org/r/4412/#comment24957>

    Nitpick: this should be < 0 instead of <= 0. 0 is a valid fd, even though it's usually reserved for STDIN_FILENO.


- Mark Michelson


On Feb. 10, 2015, 6:06 p.m., Kevin Harwell wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4412/
> -----------------------------------------------------------
> 
> (Updated Feb. 10, 2015, 6:06 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-24701
>     https://issues.asterisk.org/jira/browse/ASTERISK-24701
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> When writing to a websocket if a timeout occurred the underlying socket did not get closed/disconnected. This patch makes sure the websocket gets disconnected on a write timeout. Also a notice is logged stating that the websocket was disconnected.
> 
> 
> Diffs
> -----
> 
>   branches/13/res/res_http_websocket.c 431641 
>   branches/13/res/ari/ari_websockets.c 431641 
> 
> Diff: https://reviewboard.asterisk.org/r/4412/diff/
> 
> 
> Testing
> -------
> 
> I had trouble getting an actual write timeout to occur, so I just forced an error on write to make sure the underlying socket would get closed and the notice was logged. Also ran relevant testsuite and unit tests.
> 
> 
> Thanks,
> 
> Kevin Harwell
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150210/59d40939/attachment.html>


More information about the asterisk-dev mailing list