2009-07-30 13:45:54 +02:00
|
|
|
%%%----------------------------------------------------------------------
|
|
|
|
%%% File : mod_ping.erl
|
|
|
|
%%% Author : Brian Cully <bjc@kublai.com>
|
|
|
|
%%% Purpose : Support XEP-0199 XMPP Ping and periodic keepalives
|
|
|
|
%%% Created : 11 Jul 2009 by Brian Cully <bjc@kublai.com>
|
2009-07-30 10:58:21 +02:00
|
|
|
%%%
|
|
|
|
%%%
|
2023-01-09 17:09:06 +01:00
|
|
|
%%% ejabberd, Copyright (C) 2002-2023 ProcessOne
|
2009-07-30 10:58:21 +02:00
|
|
|
%%%
|
2009-07-30 13:45:54 +02:00
|
|
|
%%% This program is free software; you can redistribute it and/or
|
|
|
|
%%% modify it under the terms of the GNU General Public License as
|
|
|
|
%%% published by the Free Software Foundation; either version 2 of the
|
|
|
|
%%% License, or (at your option) any later version.
|
2009-07-30 10:58:21 +02:00
|
|
|
%%%
|
2009-07-30 13:45:54 +02:00
|
|
|
%%% This program is distributed in the hope that it will be useful,
|
|
|
|
%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
%%% General Public License for more details.
|
2009-07-30 10:58:21 +02:00
|
|
|
%%%
|
2014-02-22 11:27:40 +01:00
|
|
|
%%% You should have received a copy of the GNU General Public License along
|
|
|
|
%%% with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
%%% 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2009-07-30 13:45:54 +02:00
|
|
|
%%%
|
|
|
|
%%%----------------------------------------------------------------------
|
|
|
|
|
2009-07-30 10:58:21 +02:00
|
|
|
-module(mod_ping).
|
2013-03-14 10:33:02 +01:00
|
|
|
|
2009-07-30 10:58:21 +02:00
|
|
|
-author('bjc@kublai.com').
|
|
|
|
|
2015-05-21 17:02:36 +02:00
|
|
|
-protocol({xep, 199, '2.0'}).
|
|
|
|
|
2018-01-31 14:57:43 +01:00
|
|
|
-behaviour(gen_mod).
|
2013-03-14 10:33:02 +01:00
|
|
|
|
2018-01-31 14:57:43 +01:00
|
|
|
-behaviour(gen_server).
|
2009-07-30 10:58:21 +02:00
|
|
|
|
2013-04-08 11:12:54 +02:00
|
|
|
-include("logger.hrl").
|
2013-03-14 10:33:02 +01:00
|
|
|
|
2020-09-03 13:45:57 +02:00
|
|
|
-include_lib("xmpp/include/xmpp.hrl").
|
2009-07-30 10:58:21 +02:00
|
|
|
|
2019-06-22 16:08:45 +02:00
|
|
|
-include("translate.hrl").
|
|
|
|
|
2009-07-30 10:58:21 +02:00
|
|
|
%% API
|
2017-02-14 10:39:26 +01:00
|
|
|
-export([start_ping/2, stop_ping/2]).
|
2009-07-30 10:58:21 +02:00
|
|
|
|
|
|
|
%% gen_mod callbacks
|
2017-02-22 17:46:47 +01:00
|
|
|
-export([start/2, stop/1, reload/3]).
|
2009-07-30 10:58:21 +02:00
|
|
|
|
|
|
|
%% gen_server callbacks
|
2013-03-14 10:33:02 +01:00
|
|
|
-export([init/1, terminate/2, handle_call/3,
|
|
|
|
handle_cast/2, handle_info/2, code_change/3]).
|
2009-07-30 10:58:21 +02:00
|
|
|
|
2020-01-08 10:24:51 +01:00
|
|
|
-export([iq_ping/1, user_online/3, user_offline/3, mod_doc/0,
|
2018-01-23 08:54:52 +01:00
|
|
|
user_send/1, mod_opt_type/1, mod_options/1, depends/2]).
|
2009-07-30 10:58:21 +02:00
|
|
|
|
2013-03-14 10:33:02 +01:00
|
|
|
-record(state,
|
2019-06-27 14:22:27 +02:00
|
|
|
{host :: binary(),
|
2018-01-23 08:54:52 +01:00
|
|
|
send_pings :: boolean(),
|
2019-07-17 21:15:56 +02:00
|
|
|
ping_interval :: pos_integer(),
|
2018-01-23 08:54:52 +01:00
|
|
|
ping_ack_timeout :: undefined | non_neg_integer(),
|
2019-06-27 14:22:27 +02:00
|
|
|
timeout_action :: none | kill,
|
|
|
|
timers :: timers()}).
|
|
|
|
|
|
|
|
-type timers() :: #{ljid() => reference()}.
|
2009-07-30 10:58:21 +02:00
|
|
|
|
|
|
|
%%====================================================================
|
|
|
|
%% API
|
|
|
|
%%====================================================================
|
2016-07-18 14:01:32 +02:00
|
|
|
-spec start_ping(binary(), jid()) -> ok.
|
2009-07-30 10:58:21 +02:00
|
|
|
start_ping(Host, JID) ->
|
|
|
|
Proc = gen_mod:get_module_proc(Host, ?MODULE),
|
|
|
|
gen_server:cast(Proc, {start_ping, JID}).
|
|
|
|
|
2016-07-18 14:01:32 +02:00
|
|
|
-spec stop_ping(binary(), jid()) -> ok.
|
2009-07-30 10:58:21 +02:00
|
|
|
stop_ping(Host, JID) ->
|
|
|
|
Proc = gen_mod:get_module_proc(Host, ?MODULE),
|
|
|
|
gen_server:cast(Proc, {stop_ping, JID}).
|
|
|
|
|
|
|
|
%%====================================================================
|
|
|
|
%% gen_mod callbacks
|
|
|
|
%%====================================================================
|
|
|
|
start(Host, Opts) ->
|
2017-02-14 10:39:26 +01:00
|
|
|
gen_mod:start_child(?MODULE, Host, Opts).
|
2009-07-30 10:58:21 +02:00
|
|
|
|
|
|
|
stop(Host) ->
|
2017-02-14 10:39:26 +01:00
|
|
|
gen_mod:stop_child(?MODULE, Host).
|
2009-07-30 10:58:21 +02:00
|
|
|
|
2017-02-22 17:46:47 +01:00
|
|
|
reload(Host, NewOpts, OldOpts) ->
|
|
|
|
Proc = gen_mod:get_module_proc(Host, ?MODULE),
|
|
|
|
gen_server:cast(Proc, {reload, Host, NewOpts, OldOpts}).
|
|
|
|
|
2009-07-30 10:58:21 +02:00
|
|
|
%%====================================================================
|
|
|
|
%% gen_server callbacks
|
|
|
|
%%====================================================================
|
2019-08-04 20:46:18 +02:00
|
|
|
init([Host|_]) ->
|
2017-02-14 08:25:08 +01:00
|
|
|
process_flag(trap_exit, true),
|
2019-08-04 20:46:18 +02:00
|
|
|
Opts = gen_mod:get_module_opts(Host, ?MODULE),
|
2017-02-22 17:46:47 +01:00
|
|
|
State = init_state(Host, Opts),
|
2018-02-11 10:54:15 +01:00
|
|
|
register_iq_handlers(Host),
|
2017-02-22 17:46:47 +01:00
|
|
|
case State#state.send_pings of
|
|
|
|
true -> register_hooks(Host);
|
|
|
|
false -> ok
|
2009-07-30 10:58:21 +02:00
|
|
|
end,
|
2017-02-22 17:46:47 +01:00
|
|
|
{ok, State}.
|
2009-07-30 10:58:21 +02:00
|
|
|
|
|
|
|
terminate(_Reason, #state{host = Host}) ->
|
2017-02-22 17:46:47 +01:00
|
|
|
unregister_hooks(Host),
|
|
|
|
unregister_iq_handlers(Host).
|
2009-07-30 10:58:21 +02:00
|
|
|
|
|
|
|
handle_call(stop, _From, State) ->
|
|
|
|
{stop, normal, ok, State};
|
2019-07-12 10:55:36 +02:00
|
|
|
handle_call(Request, From, State) ->
|
|
|
|
?WARNING_MSG("Unexpected call from ~p: ~p", [From, Request]),
|
|
|
|
{noreply, State}.
|
2009-07-30 10:58:21 +02:00
|
|
|
|
2018-02-11 10:54:15 +01:00
|
|
|
handle_cast({reload, Host, NewOpts, _OldOpts},
|
2017-02-22 17:46:47 +01:00
|
|
|
#state{timers = Timers} = OldState) ->
|
|
|
|
NewState = init_state(Host, NewOpts),
|
|
|
|
case {NewState#state.send_pings, OldState#state.send_pings} of
|
|
|
|
{true, false} -> register_hooks(Host);
|
|
|
|
{false, true} -> unregister_hooks(Host);
|
|
|
|
_ -> ok
|
|
|
|
end,
|
|
|
|
{noreply, NewState#state{timers = Timers}};
|
2009-07-30 10:58:21 +02:00
|
|
|
handle_cast({start_ping, JID}, State) ->
|
2013-03-14 10:33:02 +01:00
|
|
|
Timers = add_timer(JID, State#state.ping_interval,
|
|
|
|
State#state.timers),
|
2009-07-30 10:58:21 +02:00
|
|
|
{noreply, State#state{timers = Timers}};
|
|
|
|
handle_cast({stop_ping, JID}, State) ->
|
|
|
|
Timers = del_timer(JID, State#state.timers),
|
|
|
|
{noreply, State#state{timers = Timers}};
|
2017-02-22 17:46:47 +01:00
|
|
|
handle_cast(Msg, State) ->
|
2019-06-24 19:32:34 +02:00
|
|
|
?WARNING_MSG("Unexpected cast: ~p", [Msg]),
|
2017-02-22 17:46:47 +01:00
|
|
|
{noreply, State}.
|
2009-07-30 10:58:21 +02:00
|
|
|
|
2022-04-28 14:54:41 +02:00
|
|
|
handle_info({iq_reply, #iq{type = error} = IQ, JID}, State) ->
|
|
|
|
Timers = case xmpp:get_error(IQ) of
|
|
|
|
#stanza_error{type=cancel, reason='service-unavailable'} ->
|
|
|
|
del_timer(JID, State#state.timers);
|
|
|
|
_ ->
|
|
|
|
State#state.timers
|
|
|
|
end,
|
|
|
|
{noreply, State#state{timers = Timers}};
|
2019-01-29 18:13:28 +01:00
|
|
|
handle_info({iq_reply, #iq{}, _JID}, State) ->
|
|
|
|
{noreply, State};
|
|
|
|
handle_info({iq_reply, timeout, JID}, State) ->
|
|
|
|
ejabberd_hooks:run(user_ping_timeout, State#state.host,
|
|
|
|
[JID]),
|
2019-03-13 11:07:13 +01:00
|
|
|
Timers = case State#state.timeout_action of
|
2022-04-26 18:56:38 +02:00
|
|
|
kill ->
|
|
|
|
#jid{user = User, server = Server,
|
|
|
|
resource = Resource} =
|
|
|
|
JID,
|
|
|
|
case ejabberd_sm:get_session_pid(User, Server, Resource) of
|
|
|
|
Pid when is_pid(Pid) ->
|
|
|
|
ejabberd_c2s:close(Pid, ping_timeout);
|
|
|
|
_ ->
|
|
|
|
ok
|
|
|
|
end,
|
|
|
|
del_timer(JID, State#state.timers);
|
|
|
|
_ ->
|
|
|
|
State#state.timers
|
|
|
|
end,
|
2019-01-29 18:13:28 +01:00
|
|
|
{noreply, State#state{timers = Timers}};
|
2009-07-30 10:58:21 +02:00
|
|
|
handle_info({timeout, _TRef, {ping, JID}}, State) ->
|
2022-04-26 18:56:38 +02:00
|
|
|
Timers = case ejabberd_sm:get_session_pid(JID#jid.luser,
|
|
|
|
JID#jid.lserver,
|
|
|
|
JID#jid.lresource) of
|
|
|
|
none ->
|
|
|
|
del_timer(JID, State#state.timers);
|
|
|
|
_ ->
|
|
|
|
Host = State#state.host,
|
|
|
|
From = jid:make(Host),
|
|
|
|
IQ = #iq{from = From, to = JID, type = get, sub_els = [#ping{}]},
|
|
|
|
ejabberd_router:route_iq(IQ, JID,
|
|
|
|
gen_mod:get_module_proc(Host, ?MODULE),
|
|
|
|
State#state.ping_ack_timeout),
|
|
|
|
add_timer(JID, State#state.ping_interval,
|
|
|
|
State#state.timers)
|
|
|
|
end,
|
2009-07-30 10:58:21 +02:00
|
|
|
{noreply, State#state{timers = Timers}};
|
2019-07-12 10:55:36 +02:00
|
|
|
handle_info(Info, State) ->
|
|
|
|
?WARNING_MSG("Unexpected info: ~p", [Info]),
|
|
|
|
{noreply, State}.
|
2009-07-30 10:58:21 +02:00
|
|
|
|
2013-03-14 10:33:02 +01:00
|
|
|
code_change(_OldVsn, State, _Extra) -> {ok, State}.
|
2009-07-30 10:58:21 +02:00
|
|
|
|
|
|
|
%%====================================================================
|
|
|
|
%% Hook callbacks
|
|
|
|
%%====================================================================
|
2016-07-18 14:01:32 +02:00
|
|
|
-spec iq_ping(iq()) -> iq().
|
|
|
|
iq_ping(#iq{type = get, sub_els = [#ping{}]} = IQ) ->
|
|
|
|
xmpp:make_iq_result(IQ);
|
|
|
|
iq_ping(#iq{lang = Lang} = IQ) ->
|
2019-06-22 16:08:45 +02:00
|
|
|
Txt = ?T("Ping query is incorrect"),
|
2016-07-18 14:01:32 +02:00
|
|
|
xmpp:make_error(IQ, xmpp:err_bad_request(Txt, Lang)).
|
|
|
|
|
2016-08-09 09:56:32 +02:00
|
|
|
-spec user_online(ejabberd_sm:sid(), jid(), ejabberd_sm:info()) -> ok.
|
2009-07-30 10:58:21 +02:00
|
|
|
user_online(_SID, JID, _Info) ->
|
|
|
|
start_ping(JID#jid.lserver, JID).
|
|
|
|
|
2016-08-09 09:56:32 +02:00
|
|
|
-spec user_offline(ejabberd_sm:sid(), jid(), ejabberd_sm:info()) -> ok.
|
2009-07-30 10:58:21 +02:00
|
|
|
user_offline(_SID, JID, _Info) ->
|
2020-05-11 17:37:00 +02:00
|
|
|
case ejabberd_sm:get_session_pid(JID#jid.luser,
|
|
|
|
JID#jid.lserver,
|
|
|
|
JID#jid.lresource) of
|
2022-05-23 16:52:27 +02:00
|
|
|
PID when PID =:= none; node(PID) /= node() ->
|
2020-05-11 17:37:00 +02:00
|
|
|
stop_ping(JID#jid.lserver, JID);
|
|
|
|
_ ->
|
|
|
|
ok
|
|
|
|
end.
|
2009-07-30 10:58:21 +02:00
|
|
|
|
2017-01-09 15:02:17 +01:00
|
|
|
-spec user_send({stanza(), ejabberd_c2s:state()}) -> {stanza(), ejabberd_c2s:state()}.
|
|
|
|
user_send({Packet, #{jid := JID} = C2SState}) ->
|
2015-06-22 15:56:08 +02:00
|
|
|
start_ping(JID#jid.lserver, JID),
|
2017-01-09 15:02:17 +01:00
|
|
|
{Packet, C2SState}.
|
|
|
|
|
2009-07-30 10:58:21 +02:00
|
|
|
%%====================================================================
|
|
|
|
%% Internal functions
|
|
|
|
%%====================================================================
|
2017-02-22 17:46:47 +01:00
|
|
|
init_state(Host, Opts) ->
|
2019-06-14 11:33:26 +02:00
|
|
|
SendPings = mod_ping_opt:send_pings(Opts),
|
|
|
|
PingInterval = mod_ping_opt:ping_interval(Opts),
|
|
|
|
PingAckTimeout = mod_ping_opt:ping_ack_timeout(Opts),
|
|
|
|
TimeoutAction = mod_ping_opt:timeout_action(Opts),
|
2017-02-22 17:46:47 +01:00
|
|
|
#state{host = Host,
|
|
|
|
send_pings = SendPings,
|
|
|
|
ping_interval = PingInterval,
|
|
|
|
timeout_action = TimeoutAction,
|
|
|
|
ping_ack_timeout = PingAckTimeout,
|
2019-06-27 14:22:27 +02:00
|
|
|
timers = #{}}.
|
2017-02-22 17:46:47 +01:00
|
|
|
|
|
|
|
register_hooks(Host) ->
|
|
|
|
ejabberd_hooks:add(sm_register_connection_hook, Host,
|
|
|
|
?MODULE, user_online, 100),
|
|
|
|
ejabberd_hooks:add(sm_remove_connection_hook, Host,
|
|
|
|
?MODULE, user_offline, 100),
|
|
|
|
ejabberd_hooks:add(user_send_packet, Host, ?MODULE,
|
|
|
|
user_send, 100).
|
|
|
|
|
|
|
|
unregister_hooks(Host) ->
|
|
|
|
ejabberd_hooks:delete(sm_remove_connection_hook, Host,
|
|
|
|
?MODULE, user_offline, 100),
|
|
|
|
ejabberd_hooks:delete(sm_register_connection_hook, Host,
|
|
|
|
?MODULE, user_online, 100),
|
|
|
|
ejabberd_hooks:delete(user_send_packet, Host, ?MODULE,
|
|
|
|
user_send, 100).
|
|
|
|
|
2018-02-11 10:54:15 +01:00
|
|
|
register_iq_handlers(Host) ->
|
2017-02-22 17:46:47 +01:00
|
|
|
gen_iq_handler:add_iq_handler(ejabberd_sm, Host, ?NS_PING,
|
2018-02-11 10:54:15 +01:00
|
|
|
?MODULE, iq_ping),
|
2017-02-22 17:46:47 +01:00
|
|
|
gen_iq_handler:add_iq_handler(ejabberd_local, Host, ?NS_PING,
|
2018-02-11 10:54:15 +01:00
|
|
|
?MODULE, iq_ping).
|
2017-02-22 17:46:47 +01:00
|
|
|
|
|
|
|
unregister_iq_handlers(Host) ->
|
|
|
|
gen_iq_handler:remove_iq_handler(ejabberd_local, Host, ?NS_PING),
|
|
|
|
gen_iq_handler:remove_iq_handler(ejabberd_sm, Host, ?NS_PING).
|
|
|
|
|
2019-07-17 21:15:56 +02:00
|
|
|
-spec add_timer(jid(), pos_integer(), timers()) -> timers().
|
2009-07-30 10:58:21 +02:00
|
|
|
add_timer(JID, Interval, Timers) ->
|
2015-11-24 16:44:13 +01:00
|
|
|
LJID = jid:tolower(JID),
|
2016-01-28 11:21:37 +01:00
|
|
|
NewTimers = case maps:find(LJID, Timers) of
|
2022-04-26 18:56:38 +02:00
|
|
|
{ok, OldTRef} ->
|
|
|
|
misc:cancel_timer(OldTRef),
|
|
|
|
maps:remove(LJID, Timers);
|
|
|
|
_ -> Timers
|
2009-07-30 10:58:21 +02:00
|
|
|
end,
|
2019-07-17 21:15:56 +02:00
|
|
|
TRef = erlang:start_timer(Interval, self(), {ping, JID}),
|
2016-01-28 11:21:37 +01:00
|
|
|
maps:put(LJID, TRef, NewTimers).
|
2009-07-30 10:58:21 +02:00
|
|
|
|
2019-06-27 14:22:27 +02:00
|
|
|
-spec del_timer(jid(), timers()) -> timers().
|
2009-07-30 10:58:21 +02:00
|
|
|
del_timer(JID, Timers) ->
|
2015-11-24 16:44:13 +01:00
|
|
|
LJID = jid:tolower(JID),
|
2016-01-28 11:21:37 +01:00
|
|
|
case maps:find(LJID, Timers) of
|
2022-04-26 18:56:38 +02:00
|
|
|
{ok, TRef} ->
|
|
|
|
misc:cancel_timer(TRef),
|
|
|
|
maps:remove(LJID, Timers);
|
|
|
|
_ -> Timers
|
2009-07-30 10:58:21 +02:00
|
|
|
end.
|
|
|
|
|
2016-07-07 11:17:38 +02:00
|
|
|
depends(_Host, _Opts) ->
|
|
|
|
[].
|
|
|
|
|
2015-06-01 14:38:27 +02:00
|
|
|
mod_opt_type(ping_interval) ->
|
2019-07-17 21:15:56 +02:00
|
|
|
econf:timeout(second);
|
2015-11-18 13:25:01 +01:00
|
|
|
mod_opt_type(ping_ack_timeout) ->
|
2019-06-14 11:33:26 +02:00
|
|
|
econf:timeout(second);
|
2015-06-01 14:38:27 +02:00
|
|
|
mod_opt_type(send_pings) ->
|
2019-06-14 11:33:26 +02:00
|
|
|
econf:bool();
|
2015-06-01 14:38:27 +02:00
|
|
|
mod_opt_type(timeout_action) ->
|
2019-06-14 11:33:26 +02:00
|
|
|
econf:enum([none, kill]).
|
2018-01-23 08:54:52 +01:00
|
|
|
|
2018-02-11 10:54:15 +01:00
|
|
|
mod_options(_Host) ->
|
2019-07-17 21:15:56 +02:00
|
|
|
[{ping_interval, timer:minutes(1)},
|
2018-01-23 08:54:52 +01:00
|
|
|
{ping_ack_timeout, undefined},
|
|
|
|
{send_pings, false},
|
|
|
|
{timeout_action, none}].
|
2020-01-08 10:24:51 +01:00
|
|
|
|
|
|
|
mod_doc() ->
|
|
|
|
#{desc =>
|
|
|
|
?T("This module implements support for "
|
|
|
|
"https://xmpp.org/extensions/xep-0199.html"
|
|
|
|
"[XEP-0199: XMPP Ping] and periodic keepalives. "
|
|
|
|
"When this module is enabled ejabberd responds "
|
|
|
|
"correctly to ping requests, as defined by the protocol."),
|
|
|
|
opts =>
|
|
|
|
[{ping_interval,
|
|
|
|
#{value => "timeout()",
|
|
|
|
desc =>
|
|
|
|
?T("How often to send pings to connected clients, "
|
|
|
|
"if option 'send_pings' is set to 'true'. If a client "
|
|
|
|
"connection does not send or receive any stanza "
|
|
|
|
"within this interval, a ping request is sent to "
|
|
|
|
"the client. The default value is '1' minute.")}},
|
|
|
|
{ping_ack_timeout,
|
|
|
|
#{value => "timeout()",
|
|
|
|
desc =>
|
|
|
|
?T("How long to wait before deeming that a client "
|
|
|
|
"has not answered a given server ping request. "
|
2021-09-14 11:24:49 +02:00
|
|
|
"The default value is 'undefined'.")}},
|
2020-01-08 10:24:51 +01:00
|
|
|
{send_pings,
|
|
|
|
#{value => "true | false",
|
|
|
|
desc =>
|
|
|
|
?T("If this option is set to 'true', the server "
|
|
|
|
"sends pings to connected clients that are not "
|
|
|
|
"active in a given interval defined in 'ping_interval' "
|
|
|
|
"option. This is useful to keep client connections "
|
|
|
|
"alive or checking availability. "
|
|
|
|
"The default value is 'false'.")}},
|
|
|
|
{timeout_action,
|
|
|
|
#{value => "none | kill",
|
|
|
|
desc =>
|
|
|
|
?T("What to do when a client does not answer to a "
|
|
|
|
"server ping request in less than period defined "
|
|
|
|
"in 'ping_ack_timeout' option: "
|
|
|
|
"'kill' means destroying the underlying connection, "
|
2021-08-21 18:31:21 +02:00
|
|
|
"'none' means to do nothing. NOTE: when _`mod_stream_mgmt`_ "
|
|
|
|
"is loaded and stream management is enabled by "
|
2020-01-08 10:24:51 +01:00
|
|
|
"a client, killing the client connection doesn't mean "
|
|
|
|
"killing the client session - the session will be kept "
|
|
|
|
"alive in order to give the client a chance to resume it. "
|
|
|
|
"The default value is 'none'.")}}],
|
|
|
|
example =>
|
|
|
|
["modules:",
|
|
|
|
" ...",
|
|
|
|
" mod_ping:",
|
|
|
|
" send_pings: true",
|
|
|
|
" ping_interval: 4 min",
|
|
|
|
" timeout_action: kill",
|
|
|
|
" ..."]}.
|