Skip to content
This repository has been archived by the owner on Nov 18, 2020. It is now read-only.

Commit

Permalink
Backport bug 24953 (Erlang client should use fhc when running in the …
Browse files Browse the repository at this point in the history
…same VM as rabbit)
  • Loading branch information
Simon MacMullen committed Aug 15, 2012
1 parent cb652f5 commit e206de1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/amqp_network_connection.erl
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ do_connect({Addr, Family},
connection_timeout = Timeout,
socket_options = ExtraOpts},
SIF, ChMgr, State) ->
obtain(),
case gen_tcp:connect(Addr, Port,
[Family | ?RABBIT_TCP_OPTS] ++ ExtraOpts,
Timeout) of
Expand All @@ -131,6 +132,7 @@ do_connect({Addr, Family},
socket_options = ExtraOpts},
SIF, ChMgr, State) ->
rabbit_misc:start_applications([crypto, public_key, ssl]),
obtain(),
case gen_tcp:connect(Addr, Port,
[Family | ?RABBIT_TCP_OPTS] ++ ExtraOpts,
Timeout) of
Expand Down Expand Up @@ -306,3 +308,9 @@ handshake_recv(Expecting) ->
exit(handshake_receive_timed_out)
end
end.

obtain() ->
case code:is_loaded(file_handle_cache) of
false -> ok;
_ -> file_handle_cache:obtain()
end.

0 comments on commit e206de1

Please sign in to comment.