Allow for false to close not crash
If PID has gone away
This commit is contained in:
parent
be6e23f7de
commit
509d541c9f
1 changed files with 6 additions and 2 deletions
|
@ -638,8 +638,12 @@ reader(close, _From, State) ->
|
||||||
{stop, normal, ok, State}.
|
{stop, normal, ok, State}.
|
||||||
|
|
||||||
reader(timeout, State) ->
|
reader(timeout, State) ->
|
||||||
true = is_process_alive(State#state.starting_pid),
|
case is_process_alive(State#state.starting_pid) of
|
||||||
{next_state, reader, State}.
|
true ->
|
||||||
|
{next_state, reader, State};
|
||||||
|
false ->
|
||||||
|
{stop, normal, State}
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
delete_pending({get_kv, LedgerKey, Hash}, _From, State) ->
|
delete_pending({get_kv, LedgerKey, Hash}, _From, State) ->
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue