mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 17:59:31 +02:00
ejabberd_listener: Remove Erlang/OTP version check
We don't support Erlang/OTP versions older than R16 anyway.
This commit is contained in:
parent
b81b0d0be9
commit
0fd4984c23
1 changed files with 2 additions and 10 deletions
|
@ -195,22 +195,14 @@ listen_tcp(PortIP, Module, SockOpts, Port, IPS) ->
|
||||||
ets:delete(listen_sockets, Port),
|
ets:delete(listen_sockets, Port),
|
||||||
ListenSocket;
|
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,
|
Res = gen_tcp:listen(Port, [binary,
|
||||||
{packet, 0},
|
{packet, 0},
|
||||||
{active, false},
|
{active, false},
|
||||||
{reuseaddr, true},
|
{reuseaddr, true},
|
||||||
{nodelay, true},
|
{nodelay, true},
|
||||||
{send_timeout, ?TCP_SEND_TIMEOUT},
|
{send_timeout, ?TCP_SEND_TIMEOUT},
|
||||||
{keepalive, true} |
|
{send_timeout_close, true},
|
||||||
SockOpts2]),
|
{keepalive, true}]),
|
||||||
case Res of
|
case Res of
|
||||||
{ok, ListenSocket} ->
|
{ok, ListenSocket} ->
|
||||||
ListenSocket;
|
ListenSocket;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue