diff options
-rw-r--r-- | src/ejabberd_s2s_in.erl | 12 | ||||
-rw-r--r-- | src/mod_pubsub_odbc.erl | 11 |
2 files changed, 10 insertions, 13 deletions
diff --git a/src/ejabberd_s2s_in.erl b/src/ejabberd_s2s_in.erl index 3eb0b71cc..a3e772dfc 100644 --- a/src/ejabberd_s2s_in.erl +++ b/src/ejabberd_s2s_in.erl @@ -294,15 +294,9 @@ wait_for_stream({xmlstreamstart, _Name, Attrs}, ?INFO_MSG("Closing s2s connection: ~s <--> ~s (~s)", [StateData#state.server, RemoteServer, CertError]), send_text(StateData, - xml:element_to_binary(?SERRT_POLICY_VIOLATION(<<"en">>, - CertError))), - {atomic, Pid} = - ejabberd_s2s:find_connection(jlib:make_jid(<<"">>, - Server, <<"">>), - jlib:make_jid(<<"">>, - RemoteServer, - <<"">>)), - ejabberd_s2s_out:stop_connection(Pid), + <<(xml:element_to_binary(?SERRT_POLICY_VIOLATION(<<"en">>, + CertError)))/binary, + (?STREAM_TRAILER)/binary>>), {stop, normal, StateData}; {VerifyResult, RemoteServer, Msg} -> {SASL, NewStateData} = case VerifyResult of diff --git a/src/mod_pubsub_odbc.erl b/src/mod_pubsub_odbc.erl index 3d26ad0fa..00e619213 100644 --- a/src/mod_pubsub_odbc.erl +++ b/src/mod_pubsub_odbc.erl @@ -885,10 +885,10 @@ unsubscribe_user(Entity, Owner) -> Host = host(element(2, BJID)), spawn(fun () -> lists:foreach(fun (PType) -> - {result, Subscriptions} = - node_action(Host, PType, + case node_action(Host, PType, get_entity_subscriptions, - [Host, Entity]), + [Host, Entity]) of + {result, Subscriptions} -> lists:foreach(fun ({#pubsub_node{options = Options, @@ -922,7 +922,10 @@ unsubscribe_user(Entity, Owner) -> end; (_) -> ok end, - Subscriptions) + Subscriptions); + Error -> + ?DEBUG("Error at node_action: ~p", [Error]) + end end, plugins(Host)) end). |