fix
This commit is contained in:
parent
5dc3ecd671
commit
20c22a0df7
@ -400,7 +400,13 @@ handle_event(info, {'DOWN', MRef, process, TransportPid, Reason}, _, State = #st
|
||||
%% terminate. It should be the opposite of Module:init/1 and do any
|
||||
%% necessary cleaning up. When it returns, the gen_statem terminates with
|
||||
%% Reason. The return value is ignored.
|
||||
terminate(_Reason, _StateName, _State = #state{}) ->
|
||||
terminate(_Reason, _StateName, _State = #state{transport_pid = TransportPid}) ->
|
||||
case is_pid(TransportPid) andalso is_process_alive(TransportPid) of
|
||||
true ->
|
||||
efka_transport:stop(TransportPid);
|
||||
false ->
|
||||
ok
|
||||
end,
|
||||
ok.
|
||||
|
||||
%% @private
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user