add debug
This commit is contained in:
parent
bef6c87702
commit
6bce50ea65
@ -430,10 +430,10 @@ handle_event(EventType, Info, StateName, State) ->
|
|||||||
%% terminate. It should be the opposite of Module:init/1 and do any
|
%% terminate. It should be the opposite of Module:init/1 and do any
|
||||||
%% necessary cleaning up. When it returns, the gen_statem terminates with
|
%% necessary cleaning up. When it returns, the gen_statem terminates with
|
||||||
%% Reason. The return value is ignored.
|
%% Reason. The return value is ignored.
|
||||||
terminate(Reason, _StateName, _State = #state{conn = Conn, stream = Stream, offline_cb = OfflineCb, close_reason = CloseReason}) ->
|
terminate(Reason, _StateName, _State = #state{conn = Conn, stream = Stream, client_id = ClientId, offline_cb = OfflineCb, close_reason = CloseReason}) ->
|
||||||
Stream /= undefined andalso quicer:close_stream(Stream, 1000),
|
Stream /= undefined andalso quicer:close_stream(Stream, 1000),
|
||||||
quicer:close_connection(Conn),
|
quicer:close_connection(Conn),
|
||||||
logger:notice("[sdlan_quic_conn] terminate closed with reason: ~p, close_reason: ~p", [Reason, CloseReason]),
|
logger:notice("[sdlan_quic_conn] client_id: ~p, terminate closed with reason: ~p, close_reason: ~p", [ClientId, Reason, CloseReason]),
|
||||||
%% 触发客户端的离线逻辑
|
%% 触发客户端的离线逻辑
|
||||||
is_function(OfflineCb) andalso OfflineCb(),
|
is_function(OfflineCb) andalso OfflineCb(),
|
||||||
ok.
|
ok.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user