ejabberd_listener: Remove Erlang/OTP version check

We don't support Erlang/OTP versions older than R16 anyway.
This commit is contained in:
Holger Weiss 2015-04-07 09:47:05 +02:00
parent b81b0d0be9
commit 0fd4984c23
1 changed files with 2 additions and 10 deletions

View File

@ -195,22 +195,14 @@ listen_tcp(PortIP, Module, SockOpts, Port, IPS) ->
ets:delete(listen_sockets, Port),
ListenSocket;
_ ->
SockOpts2 = try erlang:system_info(otp_release) of
EVsn when EVsn >= "R13B"; EVsn >= "17" ->
[{send_timeout_close, true} | SockOpts];
_ ->
SockOpts
catch
_:_ -> []
end,
Res = gen_tcp:listen(Port, [binary,
{packet, 0},
{active, false},
{reuseaddr, true},
{nodelay, true},
{send_timeout, ?TCP_SEND_TIMEOUT},
{keepalive, true} |
SockOpts2]),
{send_timeout_close, true},
{keepalive, true}]),
case Res of
{ok, ListenSocket} ->
ListenSocket;