When aborting an incoming s2s connection due to certificate verification
errors, send a stream trailer before closing the socket.
?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))),
+ <<(xml:element_to_binary(?SERRT_POLICY_VIOLATION(<<"en">>,
+ CertError)))/binary,
+ (?STREAM_TRAILER)/binary>>),
{atomic, Pid} =
ejabberd_s2s:find_connection(jlib:make_jid(<<"">>,
Server, <<"">>),