25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Make hibernate timeouts configurable

Two *global* options added:
c2s_hibernate and receiver_hibernate.

Default if not specified is 90000, the previous hardcoded value.
This commit is contained in:
Pablo Polvorin 2016-02-04 15:45:29 -03:00
parent e207d0af56
commit 942072cf9d
2 changed files with 3 additions and 2 deletions

View File

@ -133,7 +133,7 @@
%% session: %% session:
-define(C2S_OPEN_TIMEOUT, 60000). -define(C2S_OPEN_TIMEOUT, 60000).
-define(C2S_HIBERNATE_TIMEOUT, 90000). -define(C2S_HIBERNATE_TIMEOUT, ejabberd_config:get_option(c2s_hibernate, fun(X) when is_integer(X); X == hibernate-> X end, 90000)).
-define(STREAM_HEADER, -define(STREAM_HEADER,
<<"<?xml version='1.0'?><stream:stream " <<"<?xml version='1.0'?><stream:stream "

View File

@ -56,7 +56,8 @@
xml_stream_state :: fxml_stream:xml_stream_state(), xml_stream_state :: fxml_stream:xml_stream_state(),
timeout = infinity:: timeout()}). timeout = infinity:: timeout()}).
-define(HIBERNATE_TIMEOUT, 90000). -define(HIBERNATE_TIMEOUT, ejabberd_config:get_option(receiver_hibernate, fun(X) when is_integer(X); X == hibernate-> X end, 90000)).
-spec start_link(inet:socket(), atom(), shaper:shaper(), -spec start_link(inet:socket(), atom(), shaper:shaper(),
non_neg_integer() | infinity) -> ignore | non_neg_integer() | infinity) -> ignore |