This commit is contained in:
anlicheng 2025-04-22 17:57:59 +08:00
parent 2166510989
commit 8f8e813a8c
2 changed files with 2 additions and 3 deletions

View File

@ -85,7 +85,7 @@ handle_info({timeout, _, create_transport}, State = #state{}) ->
{ok, TransportPid} ->
Ref = efka_transport:auth_request(TransportPid, 5000),
receive
%%
%%
{auth_reply, Ref, {ok, #auth_reply{code = 1, message = Message, repository_url = RepositoryUrl}}} ->
lager:debug("[efka_agent] auth result: ~p, repository_url: ~p", [Message, RepositoryUrl]),
{noreply, State#state{transport_pid = TransportPid, status = ?STATE_ACTIVATED}};

View File

@ -120,12 +120,11 @@ handle_cast({auth_request, ReceiverPid, Ref, Timeout}, State = #state{socket = S
%% auth返回的结果
receive
{ssl, Socket, <<?PACKET_RESPONSE, PacketId:32, ?METHOD_AUTH, ReplyBin/binary>>} ->
lager:debug("call me here auth reply"),
ReceiverPid ! {auth_reply, Ref, {ok, message_pb:decode_msg(ReplyBin, auth_reply)}},
{noreply, State#state{packet_id = PacketId + 1}}
after Timeout ->
ReceiverPid ! {auth_reply, Ref, {error, timeout}},
{noreply, State}
{stop, normal, State}
end;
handle_cast({send, Method, Packet}, State = #state{socket = Socket}) ->