25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

fix otp version check in listen_tcp/5

This commit is contained in:
liudan 2015-04-07 09:28:35 +08:00
parent 2a94c68724
commit f981a53f9a

View File

@ -195,9 +195,11 @@ listen_tcp(PortIP, Module, SockOpts, Port, IPS) ->
ets:delete(listen_sockets, Port),
ListenSocket;
_ ->
SockOpts2 = try erlang:system_info(otp_release) >= "R13B" of
true -> [{send_timeout_close, true} | SockOpts];
false -> SockOpts
SockOpts2 = try erlang:system_info(otp_release) of
EVsn when EVsn >= "R13B"; EVsn >= "17" ->
[{send_timeout_close, true} | SockOpts];
_ ->
SockOpts
catch
_:_ -> []
end,