summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorDade Brandon <dade@xencall.com>2015-12-25 07:56:44 -0800
committerDade Brandon <dade@xencall.com>2015-12-25 08:07:14 -0800
commitbe050f26382b215b9fb3e4b86c13e41929327c71 (patch)
tree3ad4941e3fa7b94e1dc763c80832d8302d0a0352 /channels
parent1e24a0ca8ae075af2814668fc99ecfabb47423b3 (diff)
chan_sip.c: fix websocket_write_timeout default value
websocket_write_timeout was not being set to its default value during sip config reload, which meant that prior to this commit, 1) the default value of 100 was not used, unless an invalid value (or 1) was specified in sip.conf for websocket_write_timeout, and 2) if the websocket_write_timeout directive was removed from sip.conf without a full restart of asterisk, then the previous value would continue to be used indefinitely. This essentially lead to a 0ms write timeout (the first write attempt in ast_careful_fwrite must have succeeded) in websocket write requests from chan_sip, unless websocket_write_timeout was explicitely set in sip.conf. Changes to websocket_write_timeout still only apply to new websocket sessions, after the sip reload -- timeouts on existing sessions are not adjusted during sip reload. Change-Id: Ibed3816ed29cc354af6564c5ab3e75eab72cb953
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 500aeb785..c2df516e2 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -31465,6 +31465,7 @@ static int reload_config(enum channelreloadreason reason)
global_dynamic_exclude_static = 0; /* Exclude static peers */
sip_cfg.tcp_enabled = FALSE;
sip_cfg.websocket_enabled = TRUE;
+ sip_cfg.websocket_write_timeout = AST_DEFAULT_WEBSOCKET_WRITE_TIMEOUT;
/* Session-Timers */
global_st_mode = SESSION_TIMER_MODE_ACCEPT;