diff --git a/rebar.config b/rebar.config index 2d8711e2e..fe8c8ab72 100644 --- a/rebar.config +++ b/rebar.config @@ -25,7 +25,7 @@ {fast_tls, ".*", {git, "https://github.com/processone/fast_tls", "9b25543cf1200e3b216996598771962461ea51c8"}}, {stringprep, ".*", {git, "https://github.com/processone/stringprep", {tag, "1.0.14"}}}, {fast_xml, ".*", {git, "https://github.com/processone/fast_xml", {tag, "1.1.34"}}}, - {xmpp, ".*", {git, "https://github.com/processone/xmpp", {tag, "1.2.5"}}}, + {xmpp, ".*", {git, "https://github.com/processone/xmpp", "032548195547c68e77c7d89f51e3fbe0522fc218"}}, {fast_yaml, ".*", {git, "https://github.com/processone/fast_yaml", {tag, "1.0.17"}}}, {jiffy, ".*", {git, "https://github.com/davisp/jiffy", {tag, "0.14.8"}}}, {p1_oauth2, ".*", {git, "https://github.com/processone/p1_oauth2", {tag, "0.6.3"}}}, diff --git a/src/ejabberd_c2s.erl b/src/ejabberd_c2s.erl index db7fb9bdf..c65e71bdf 100644 --- a/src/ejabberd_c2s.erl +++ b/src/ejabberd_c2s.erl @@ -49,7 +49,7 @@ -export([get_presence/1, set_presence/2, resend_presence/1, resend_presence/2, open_session/1, call/3, cast/2, send/2, close/1, close/2, stop/1, reply/2, copy_state/2, set_timeout/2, route/2, - host_up/1, host_down/1]). + host_up/1, host_down/1, send_ws_ping/1]). -include("xmpp.hrl"). -include("logger.hrl"). @@ -137,6 +137,11 @@ send_error(#{lserver := LServer} = State, Pkt, Err) -> {Pkt1, State1} -> xmpp_stream_in:send_error(State1, Pkt1, Err) end. +-spec send_ws_ping(pid()) -> ok; + (state()) -> state(). +send_ws_ping(Ref) -> + xmpp_stream_in:send_ws_ping(Ref). + -spec route(pid(), term()) -> boolean(). route(Pid, Term) -> ejabberd_cluster:send(Pid, Term).