TSM: print reason for termination in debug logging

This commit is contained in:
Harald Welte 2013-06-10 09:38:48 +02:00
parent 0637b91934
commit d5260e0a5d
1 changed files with 3 additions and 2 deletions

View File

@ -434,8 +434,9 @@ handle_info(Info, StateName, State) ->
{next_state, StateName, State}. {next_state, StateName, State}.
%% handle a shutdown request %% handle a shutdown request
terminate(_Reason, _StateName, State) -> terminate(Reason, StateName, State) ->
io:format("Deleting {~p, ~p} from tcap_transactions~n", [ State#state.localTID, self()]), io:format("Deleting {~p, ~p} from tcap_transactions (state ~p, reason ~p)~n",
[ State#state.localTID, self(), StateName, Reason]),
ets:delete(tcap_transaction, State#state.localTID), ets:delete(tcap_transaction, State#state.localTID),
%% signal TCO that we are stopping %% signal TCO that we are stopping
gen_server:cast(State#state.tco, {'tsm-stopped', State#state.supref}). gen_server:cast(State#state.tco, {'tsm-stopped', State#state.supref}).