From 609bcd6cd5323fd35ef1c18e31fc6ac0bb2ffb15 Mon Sep 17 00:00:00 2001 From: anlicheng <244108715@qq.com> Date: Thu, 15 Jan 2026 11:54:06 +0800 Subject: [PATCH] fix --- apps/sdlan/src/sdlan_network.erl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/sdlan/src/sdlan_network.erl b/apps/sdlan/src/sdlan_network.erl index bcbf1d3..c2a0c70 100644 --- a/apps/sdlan/src/sdlan_network.erl +++ b/apps/sdlan/src/sdlan_network.erl @@ -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.