]> granicus.if.org Git - ejabberd/commitdiff
ejabberd_s2s_out: Remove Erlang/OTP version check
authorHolger Weiss <holger@zedat.fu-berlin.de>
Thu, 16 Apr 2015 21:51:16 +0000 (23:51 +0200)
committerHolger Weiss <holger@zedat.fu-berlin.de>
Thu, 16 Apr 2015 21:51:16 +0000 (23:51 +0200)
The version check won't work for Erlang/OTP >= 17; and it's no longer
needed, as we don't support versions older than R16 anyway.

src/ejabberd_s2s_out.erl

index 97164326dbd4d7f7bbd2c1aae84c6db05933ae92..6196f136f2d92b8fed7f9107295be2fafab9b743 100644 (file)
@@ -319,18 +319,11 @@ open_socket1(Host, Port) ->
 open_socket2(Type, Addr, Port) ->
     ?DEBUG("s2s_out: connecting to ~p:~p~n", [Addr, Port]),
     Timeout = outgoing_s2s_timeout(),
-    SockOpts = try erlang:system_info(otp_release) >= "R13B"
-              of
-                true -> [{send_timeout_close, true}];
-                false -> []
-              catch
-                _:_ -> []
-              end,
     case catch ejabberd_socket:connect(Addr, Port,
                                       [binary, {packet, 0},
                                        {send_timeout, ?TCP_SEND_TIMEOUT},
-                                       {active, false}, Type
-                                       | SockOpts],
+                                       {send_timeout_close, true},
+                                       {active, false}, Type],
                                       Timeout)
        of
       {ok, _Socket} = R -> R;