anchor.diff:  handle_info(Info,State) ->
     case hndl_info(Info,State) of
       {Result, OutMsg, State1} ->
  +      case Result of
  +        send_stop ->
  +          close_session(State1);
  +        _ -> ok
  +      end,
         check_out_message(Result, OutMsg, State1);
  +    {stop,NewState} ->
  +      close_session(NewState),
  +      {stop,NewState};
       Other -> Other
     end.
   
  
positive.code: 
  
  close_session(#state{broker=Broker,dealer=Dealer,routing_pid=RoutingPid}) ->
    ok = erwa_broker:unsubscribe_all(Broker),
    ok = erwa_dealer:unregister_all(Dealer),
    ok = erwa_routing:disconnect(RoutingPid),
    ok = erwa_sessions:unregister_session(),
    ok.
  
  
negative.code:       {reply_stop,Msg,State}
    end;
  
  hndl_msg({abort,_Details,_ErrorUrl}=Msg,#state{is_auth=false}=State) ->
    {stop,State#state{is_auth=false}};
  
  hndl_msg(Msg,#state{is_auth=true}=State) ->
    hndl_msg_authed(Msg,State);
  
  hndl_msg(_Msg,State) ->
    {stop,State}.
  
  
  
  