fix
This commit is contained in:
parent
c54a5b35ad
commit
5f5effcd84
@ -80,10 +80,13 @@ handle_cast(_Request, State) ->
|
||||
{noreply, NewState :: #state{}, timeout() | hibernate} |
|
||||
{stop, Reason :: term(), NewState :: #state{}}.
|
||||
handle_info({udp, Sock, Ip, Port, Body}, State = #state{socket = Sock}) ->
|
||||
logger:debug("[ipv6_assist_server] get request"),
|
||||
maybe
|
||||
ThrottleKey = {Ip, Port},
|
||||
ok ?= limit_check(ThrottleKey),
|
||||
logger:debug("[ipv6_assist_server] get request11"),
|
||||
#'SDLV6AssistProbe'{pkt_id = PktId} ?= catch sdlan_pb:decode_msg(Body, 'SDLV6AssistProbe'),
|
||||
logger:debug("[ipv6_assist_server] get request22"),
|
||||
V6Bytes = sdlan_util:ipv6_to_bytes(Ip),
|
||||
ReplyBin = sdlan_pb:encode_msg(#'SDLV6AssistProbeReply'{
|
||||
pkt_id = PktId,
|
||||
@ -92,6 +95,7 @@ handle_info({udp, Sock, Ip, Port, Body}, State = #state{socket = Sock}) ->
|
||||
port = Port
|
||||
}
|
||||
}),
|
||||
logger:debug("[ipv6_assist_server] get request33"),
|
||||
ok ?= gen_udp:send(Sock, Ip, Port, ReplyBin)
|
||||
end,
|
||||
{noreply, State};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user