Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
priestjim committed Sep 22, 2016
2 parents 751bcbd + c05db05 commit ef8b0bf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/gen_rpc_tcp_acceptor.erl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
-export([start_link/1, set_socket/2, stop/1]).

%% gen_statem callbacks
-export([init/1, handle_event/4, terminate/3, code_change/4]).
-export([init/1, handle_event/4, callback_mode/0, terminate/3, code_change/4]).

%% FSM States
-export([waiting_for_socket/3, waiting_for_data/3]).
Expand Down Expand Up @@ -61,6 +61,9 @@ init({Peer}) ->
%% Store the client's IP in our state
{state_functions, waiting_for_socket, #state{peer=Peer}}.

callback_mode() ->
state_functions.

waiting_for_socket({call, From}, {socket_ready, Socket}, #state{peer=Peer} = State) ->
% Now we own the socket
ok = lager:debug("event=acquiring_socket_ownership socket=\"~p\" peer=\"~s\"", [Socket, gen_rpc_helper:peer_to_string(Peer)]),
Expand Down

0 comments on commit ef8b0bf

Please sign in to comment.