From d56eae809d505ea0442a30beb26951d51e84a4be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chmielowski?= Date: Tue, 5 Nov 2024 13:26:31 +0100 Subject: [PATCH] Catch extra case in check for s2s bidi element --- src/mod_s2s_bidi.erl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mod_s2s_bidi.erl b/src/mod_s2s_bidi.erl index de597e57d..10cc0e773 100644 --- a/src/mod_s2s_bidi.erl +++ b/src/mod_s2s_bidi.erl @@ -84,10 +84,14 @@ s2s_out_unauthenticated_features(#{db_verify := _} = State, _) -> s2s_out_unauthenticated_features(State, #stream_features{} = Pkt) -> try xmpp:try_subtag(Pkt, #s2s_bidi{}) of #s2s_bidi{} -> - ejabberd_s2s_out:send(State#{bidi_enabled => true}, #s2s_bidi{}) + ejabberd_s2s_out:send(State#{bidi_enabled => true}, #s2s_bidi{}); + _ -> + State catch _:{xmpp_codec, _Why} -> State - end. + end; +s2s_out_unauthenticated_features(State, _Pkt) -> + State. s2s_out_packet(#{bidi_enabled := true, ip := {IP, _}} = State, Pkt0) when ?is_stanza(Pkt0) ->