diff --git a/src/ejabberd_c2s.erl b/src/ejabberd_c2s.erl index e87128949..2566dec1b 100644 --- a/src/ejabberd_c2s.erl +++ b/src/ejabberd_c2s.erl @@ -246,7 +246,7 @@ init([{SockMod, Socket}, Opts, FSMLimitOpts]) -> false -> Socket1 = if - TLSEnabled -> + TLSEnabled andalso SockMod /= ejabberd_frontend_socket -> SockMod:starttls(Socket, TLSOpts); true -> Socket