fix
This commit is contained in:
parent
1ae54ab276
commit
609bcd6cd5
@ -39,8 +39,8 @@
|
|||||||
-record(endpoint, {
|
-record(endpoint, {
|
||||||
client_id :: binary(),
|
client_id :: binary(),
|
||||||
ip :: integer(),
|
ip :: integer(),
|
||||||
channel_pid :: undefined | pid(),
|
channel_pid :: pid(),
|
||||||
monitor_ref :: undefined | reference(),
|
monitor_ref :: reference(),
|
||||||
hole :: undefined | #hole{},
|
hole :: undefined | #hole{},
|
||||||
%% 记录ip和ip_v6的映射关系, #{ip_addr :: integer() => {}}
|
%% 记录ip和ip_v6的映射关系, #{ip_addr :: integer() => {}}
|
||||||
v6_info :: undefined | #sdl_v6_info{}
|
v6_info :: undefined | #sdl_v6_info{}
|
||||||
@ -401,7 +401,6 @@ handle_cast({update_hole, ClientId, Mac, Peer, NatType, V6Info}, State = #state{
|
|||||||
mac = Mac,
|
mac = Mac,
|
||||||
ip = Ip
|
ip = Ip
|
||||||
}),
|
}),
|
||||||
|
|
||||||
broadcast(fun(#endpoint{channel_pid = ChannelPid}) ->
|
broadcast(fun(#endpoint{channel_pid = ChannelPid}) ->
|
||||||
case is_process_alive(ChannelPid) of
|
case is_process_alive(ChannelPid) of
|
||||||
true ->
|
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},
|
Endpoint = Endpoint0#endpoint{hole = #hole{peer = Peer, nat_type = NatType}, v6_info = V6Info},
|
||||||
|
|
||||||
{noreply, State#state{endpoints = maps:put(Mac, Endpoint, Endpoints)}};
|
{noreply, State#state{endpoints = maps:put(Mac, Endpoint, Endpoints)}};
|
||||||
_ ->
|
error ->
|
||||||
{noreply, State}
|
{noreply, State}
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user