mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-26 17:38:45 +01:00
Get rid of a workaround against old Erlang bug
This commit is contained in:
parent
470669fa6b
commit
0a77b9f43e
@ -248,17 +248,15 @@ code_change(_OldVsn, State, _Extra) -> {ok, State}.
|
|||||||
|
|
||||||
activate_socket(#state{socket = Socket,
|
activate_socket(#state{socket = Socket,
|
||||||
sock_mod = SockMod}) ->
|
sock_mod = SockMod}) ->
|
||||||
PeerName = case SockMod of
|
Res = case SockMod of
|
||||||
gen_tcp ->
|
gen_tcp ->
|
||||||
inet:setopts(Socket, [{active, once}]),
|
inet:setopts(Socket, [{active, once}]);
|
||||||
inet:peername(Socket);
|
|
||||||
_ ->
|
_ ->
|
||||||
SockMod:setopts(Socket, [{active, once}]),
|
SockMod:setopts(Socket, [{active, once}])
|
||||||
SockMod:peername(Socket)
|
|
||||||
end,
|
end,
|
||||||
case PeerName of
|
case Res of
|
||||||
{error, _Reason} -> self() ! {tcp_closed, Socket};
|
{error, _Reason} -> self() ! {tcp_closed, Socket};
|
||||||
{ok, _} -> ok
|
ok -> ok
|
||||||
end.
|
end.
|
||||||
|
|
||||||
%% Data processing for connectors directly generating xmlelement in
|
%% Data processing for connectors directly generating xmlelement in
|
||||||
|
Loading…
Reference in New Issue
Block a user