ejabberd_s2s_out: Remove Erlang/OTP version check
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.
This commit is contained in:
parent
b447839592
commit
afdc269825
|
@ -319,18 +319,11 @@ open_socket1(Host, Port) ->
|
||||||
open_socket2(Type, Addr, Port) ->
|
open_socket2(Type, Addr, Port) ->
|
||||||
?DEBUG("s2s_out: connecting to ~p:~p~n", [Addr, Port]),
|
?DEBUG("s2s_out: connecting to ~p:~p~n", [Addr, Port]),
|
||||||
Timeout = outgoing_s2s_timeout(),
|
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,
|
case catch ejabberd_socket:connect(Addr, Port,
|
||||||
[binary, {packet, 0},
|
[binary, {packet, 0},
|
||||||
{send_timeout, ?TCP_SEND_TIMEOUT},
|
{send_timeout, ?TCP_SEND_TIMEOUT},
|
||||||
{active, false}, Type
|
{send_timeout_close, true},
|
||||||
| SockOpts],
|
{active, false}, Type],
|
||||||
Timeout)
|
Timeout)
|
||||||
of
|
of
|
||||||
{ok, _Socket} = R -> R;
|
{ok, _Socket} = R -> R;
|
||||||
|
|
Loading…
Reference in New Issue