anchor.diff:      end.
   
   %% This is the actual CALL handler
  -handle_call({{call,_M,_F,_A} = PacketTuple, URecvTO, USendTO}, Caller, #state{socket=Socket} = State) ->
  +handle_call({{call,_M,_F,_A} = PacketTuple, URecvTO, USendTO}, Caller, #state{socket=Socket,node=Node} = State) ->
       {RecvTO, SendTO} = merge_timeout_values(State#state.receive_timeout, URecvTO, State#state.send_timeout, USendTO),
       Ref = erlang:make_ref(),
       %% Spawn the worker that will wait for the server's reply
  
positive.code:                 {ok, Socket} ->
                      ok = lager:debug("function=init event=connecting_to_server server_node=\"~s\" server_ip=\"~p:~B\" result=success",
                                       [Node, Address, Port]),
                      {ok, #state{socket=Socket,send_timeout=SendTO,receive_timeout=RecvTO,inactivity_timeout=TTL}, TTL};
                  {error, Reason} ->
                      ok = lager:error("function=init event=connecting_to_server server_node=\"~s\" server_ip=\"~s:~B\" result=failure reason=\"~p\"",
                                       [Node, Address, Port, Reason]),
  
negative.code:     ok = lager:debug("function=handle_call message=call event=constructing_call_term socket=\"~p\" call_reference=\"~p\"",
                       [Socket, Ref]),
      ok = inet:setopts(Socket, [{active, once}, {send_timeout, SendTO}]),
      %% Since cast can fail because of a timed out connection without gen_rpc knowing it,
      %% we have to make sure the remote node is reachable somehow before we send data. net_kernel:connect does that
      case net_kernel:connect_node(Node) of
          true ->
              case gen_tcp:send(Socket, Packet) of
                  {error, timeout} ->
                      ok = lager:error("function=handle_call message=call event=transmission_failed socket=\"~p\" call_reference=\"~p\" reason=\"timeout\"",
                                       [Socket, Ref]),
                      %% Reply will be handled from the worker
                      {stop, {badtcp,send_timeout}, State};
                  {error, Reason} ->
                      ok = lager:error("function=handle_call message=call event=transmission_failed socket=\"~p\" call_reference=\"~p\" reason=\"~p\"",
                                       [Socket, Ref, Reason]),
                      %% Reply will be handled from the worker
                      {stop, {badtcp,Reason}, State};
                  ok ->
                      ok = lager:debug("function=handle_call message=call event=transmission_succeeded socket=\"~p\" call_reference=\"~p\"",
                                       [Socket, Ref]),
                      %% Reply will be handled from the worker
                      {noreply, State, State#state.inactivity_timeout}
              end;
          Else when Else =:= false; Else =:= ignored ->
              {stop, {badrpc,nodedown}, State}
      end;
  
  %% Gracefully terminate
  