This commit is contained in:
anlicheng 2026-01-15 11:54:06 +08:00
parent 1ae54ab276
commit 609bcd6cd5

View File

@ -39,8 +39,8 @@
-record(endpoint, {
client_id :: binary(),
ip :: integer(),
channel_pid :: undefined | pid(),
monitor_ref :: undefined | reference(),
channel_pid :: pid(),
monitor_ref :: reference(),
hole :: undefined | #hole{},
%% ip和ip_v6的映射关系, #{ip_addr :: integer() => {}}
v6_info :: undefined | #sdl_v6_info{}
@ -401,7 +401,6 @@ handle_cast({update_hole, ClientId, Mac, Peer, NatType, V6Info}, State = #state{
mac = Mac,
ip = Ip
}),
broadcast(fun(#endpoint{channel_pid = ChannelPid}) ->
case is_process_alive(ChannelPid) of
true ->
@ -416,7 +415,7 @@ handle_cast({update_hole, ClientId, Mac, Peer, NatType, V6Info}, State = #state{
Endpoint = Endpoint0#endpoint{hole = #hole{peer = Peer, nat_type = NatType}, v6_info = V6Info},
{noreply, State#state{endpoints = maps:put(Mac, Endpoint, Endpoints)}};
_ ->
error ->
{noreply, State}
end.