anchor.diff:  send_message(#state{type = incoming} = State, #server_message{} = Msg) ->
       send_server_message(State, Msg);
   send_message(#state{type = ConnType}, Msg) ->
  -    ?warning("Attempt to send msg ~p via incorrect connection ~p", [
  +    ?warning_stacktrace("Attempt to send msg ~p via wrong connection ~p", [
           Msg, ConnType
       ]),
       {error, sending_msg_via_wrong_connection}.
  
positive.code: handle_info({Ok, Socket, Data}, #state{status = performing_handshake, socket = Socket, ok = Ok} = State) ->
      case handle_handshake(State, Data) of
          {ok, NewState} ->
              activate_socket_once(NewState),
              {noreply, NewState#state{status = ready}, ?PROTO_CONNECTION_TIMEOUT};
          {error, Reason} ->
              {stop, Reason, State}
  
negative.code: %% Attempts to connect to peer provider.
  %% @end
  %%--------------------------------------------------------------------
  -spec connect_to_provider_internal(session:id(), od_provider:id(),
      Domain :: binary(), Host :: binary(),
      Port :: non_neg_integer(), Transport :: atom(),
      Timeout :: non_neg_integer()) -> state() | no_return().
  connect_to_provider_internal(SessionId, ProviderId, Domain, Host, Port, Transport, Timeout) ->
      verify_provider_identity(ProviderId),
  
      SslOpts = [
          {cacerts, oneprovider:trusted_ca_certs()},
  