aboutsummaryrefslogtreecommitdiff
path: root/src/mod_stream_mgmt.erl
diff options
context:
space:
mode:
authorEvgeny Khramtsov <ekhramtsov@process-one.net>2019-07-30 12:50:31 +0300
committerEvgeny Khramtsov <ekhramtsov@process-one.net>2019-07-30 12:50:31 +0300
commit59adfcb8e0a85bb053f70f721160ae0d7199683b (patch)
treec4666e936e60a411c82f4c938978a0eee9bf3452 /src/mod_stream_mgmt.erl
parentExpose access_model and publish_model in pubsub#metadata (diff)
Correctly report resume timeout
Diffstat (limited to 'src/mod_stream_mgmt.erl')
-rw-r--r--src/mod_stream_mgmt.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mod_stream_mgmt.erl b/src/mod_stream_mgmt.erl
index 829c07e1a..e086b29cc 100644
--- a/src/mod_stream_mgmt.erl
+++ b/src/mod_stream_mgmt.erl
@@ -381,7 +381,7 @@ handle_enable(#{mgmt_timeout := DefaultTimeout,
#sm_enabled{xmlns = Xmlns,
id = make_resume_id(State),
resume = true,
- max = Timeout};
+ max = Timeout div 1000};
true ->
?DEBUG("Stream management without resumption enabled for ~s",
[jid:encode(JID)]),
@@ -444,7 +444,8 @@ transition_to_pending(#{mgmt_state := active, mod := Mod,
transition_to_pending(#{mgmt_state := active, jid := JID,
lserver := LServer, mgmt_timeout := Timeout} = State) ->
State1 = cancel_ack_timer(State),
- ?INFO_MSG("Waiting for resumption of stream for ~s", [jid:encode(JID)]),
+ ?INFO_MSG("Waiting ~B seconds for resumption of stream for ~s",
+ [Timeout div 1000, jid:encode(JID)]),
TRef = erlang:start_timer(Timeout, self(), pending_timeout),
State2 = State1#{mgmt_state => pending, mgmt_pending_timer => TRef},
ejabberd_hooks:run_fold(c2s_session_pending, LServer, State2, []);