Smoother temrinate on destroy
don't try and terminate a dead process
This commit is contained in:
parent
e29743310d
commit
a9a20c9150
1 changed files with 14 additions and 2 deletions
|
@ -747,8 +747,20 @@ handle_info(_Info, State) ->
|
||||||
|
|
||||||
terminate(Reason, State) ->
|
terminate(Reason, State) ->
|
||||||
leveled_log:log("B0003", [Reason]),
|
leveled_log:log("B0003", [Reason]),
|
||||||
ok = leveled_inker:ink_close(State#state.inker),
|
ok =
|
||||||
ok = leveled_penciller:pcl_close(State#state.penciller).
|
case is_process_alive(State#state.inker) of
|
||||||
|
true ->
|
||||||
|
leveled_inker:ink_close(State#state.inker);
|
||||||
|
false ->
|
||||||
|
ok
|
||||||
|
end,
|
||||||
|
ok =
|
||||||
|
case is_process_alive(State#state.penciller) of
|
||||||
|
true ->
|
||||||
|
leveled_penciller:pcl_close(State#state.penciller);
|
||||||
|
false ->
|
||||||
|
ok
|
||||||
|
end.
|
||||||
|
|
||||||
code_change(_OldVsn, State, _Extra) ->
|
code_change(_OldVsn, State, _Extra) ->
|
||||||
{ok, State}.
|
{ok, State}.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue