anchor.diff:      Socket = if SslOpts /= [] ->
                        {ok, Skt} = ssl:ssl_accept(Socket0, SslOpts, 30*1000),
                        ok = ssl:setopts(Skt, SockOpts),
  +                     Peer = safe_peername(Skt, ssl),
                        Skt;
                   true ->
                        ok = inet:setopts(Socket0, SockOpts),
  +                     Peer = safe_peername(Socket0, inet),
                        Socket0
                end,
  -    {reply, ok, State#state { sock = Socket }}.
  +    {reply, ok, State#state { sock = Socket, peer = Peer }}.
   
  -handle_info({tcp_closed,_Socket},State=#state{partition=Partition,count=Count}) ->
  +handle_info({tcp_closed,_Socket},State=#state{partition=Partition,count=Count,
  +                                              peer=Peer}) ->
       lager:info("Handoff receiver for partition ~p exited after processing ~p"
  -                          " objects", [Partition, Count]),
  +                          " objects from ~p", [Partition, Count, Peer]),
       {stop, normal, State};
  -handle_info({tcp_error, _Socket, _Reason}, State=#state{partition=Partition,count=Count}) ->
  +handle_info({tcp_error, _Socket, _Reason}, State=#state{partition=Partition,count=Count,
  +                                                        peer=Peer}) ->
       lager:info("Handoff receiver for partition ~p exited after processing ~p"
  -                          " objects", [Partition, Count]),
  +                          " objects from ~p", [Partition, Count, Peer]),
       {stop, normal, State};
   handle_info({tcp, Socket, Data}, State) ->
       [MsgType|MsgData] = Data,
       case catch(process_message(MsgType, MsgData, State)) of
           {'EXIT', Reason} ->
               lager:error("Handoff receiver for partition ~p exited abnormally after "
  -                                   "processing ~p objects: ~p", [State#state.partition, State#state.count, Reason]),
  +                                   "processing ~p objects from ~p: ~p", [State#state.partition, State#state.count, State#state.peer, Reason]),
               {stop, normal, State};
           NewState when is_record(NewState, state) ->
               InetMod = if NewState#state.ssl_opts /= [] -> ssl;
  
positive.code: terminate(_Reason, _State) -> ok.
  
  code_change(_OldVsn, State, _Extra) -> {ok, State}.
  
negative.code:          terminate/2, code_change/3]).
  
  -record(state, {sock :: port(),
                  peer :: term(),
                  ssl_opts :: [] | list(),
                  tcp_mod :: atom(),
                  timeout_len :: non_neg_integer(),
  