anchor.diff:                  {error, Reason, NewTransportState} ->
                       {error, Reason, State#client_state{transport_state = NewTransportState}}
               end;
  -        {error, Reason, State} ->
  -            {error, Reason, State};
  -        ignore ->
  -            {ok, State}
  +        {error, Reason, State} -> {error, Reason, State};
  +        ignore -> {ok, State}
       end.
   
   update_map(Requests, From, AsyncMap0) when is_list(Requests) -> 
  
positive.code:                 end, AsyncMap0, Requests);
  update_map(#request{id = undefined}, _From, AsyncMap) -> AsyncMap;
  update_map(#request{id = RequestId} = Request, From, AsyncMap) -> gb_trees:enter(RequestId, {From, Request}, AsyncMap).
  
  evaluate_client_options(ClientOpts, State) ->
      KeepAliveInterval = proplists:get_value(keep_alive_interval, ClientOpts, -1),
      if
          KeepAliveInterval =< 0 ->
              {ok, State#client_state{keep_alive_interval = -1}};
          KeepAliveInterval > 0 ->
              timer:send_after(KeepAliveInterval, self(), ?PING),
              {ok, State#client_state{keep_alive_interval = KeepAliveInterval}}
      end.
  
  
  handle_internal(?PONG, State = #client_state{keep_alive_interval = KeepAliveInterval}) ->
      {ok, TimerRef} = timer:send_after(KeepAliveInterval, self(), ?PING),
  
negative.code: 
  %% --------------------------------------------------------------------------------
  %% -- Helper functions
  init_transport(TransportModule, URIRec, TransportOpts, ProtocolOpts, ClientOpts) ->
      case TransportModule:init_transport(URIRec, TransportOpts) of
          {ok, TransportState} ->
              NotificationSink = proplists:get_value(notification_sink, ProtocolOpts, undefined),
              ProtocolMod = proplists:get_value(protocol, ProtocolOpts, hello_proto_jsonrpc),
              case hello_proto:init_client(ProtocolMod, ProtocolOpts) of
                  {ok, ProtocolState} ->
                      State = #client_state{transport_mod = TransportModule,
                                            transport_state = TransportState,
                                            protocol_mod = ProtocolMod,
                                            protocol_opts = ProtocolOpts,
                                            protocol_state = ProtocolState,
                                            notification_sink = NotificationSink},
                      evaluate_client_options(ClientOpts, State);
                  {error, Reason} -> {stop, Reason}
              end;
          {error, Reason} -> {stop, Reason}
      end.
  
  evaluate_client_options(ClientOpts, State) ->
      KeepAliveInterval = proplists:get_value(keep_alive_interval, ClientOpts, -1),
      if
          KeepAliveInterval =< 0 ->
              {ok, State#client_state{keep_alive_interval = -1}};
          KeepAliveInterval > 0 ->
              timer:send_after(KeepAliveInterval, self(), ?PING),
              {ok, State#client_state{keep_alive_interval = KeepAliveInterval}}
      end.
  
  incoming_message({error, _Reason, NewTransportState}, State) -> %%will be logged later
      {noreply, State#client_state{transport_state = NewTransportState}};
  incoming_message({ok, Signature, BinResponse, NewTransportState},
  