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

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