Allow for false to close not crash

If PID has gone away
This commit is contained in:
Martin Sumner 2019-01-29 13:46:25 +00:00
parent be6e23f7de
commit 509d541c9f

View file

@ -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) ->