fix
This commit is contained in:
parent
159586da72
commit
f9b30f0afd
@ -348,6 +348,7 @@ handle_cast({update_hole, SessionToken, ClientId, Mac, Peer, NatType, V6Info}, S
|
|||||||
mac = Mac,
|
mac = Mac,
|
||||||
ip = Ip
|
ip = Ip
|
||||||
}),
|
}),
|
||||||
|
logger:debug("[sdlan_network] client_id: ~p(~p), hole changed", [ClientId, Ip]),
|
||||||
broadcast(fun(#endpoint{channel_pid = ChannelPid}) ->
|
broadcast(fun(#endpoint{channel_pid = ChannelPid}) ->
|
||||||
sdlan_quic_channel:send_event(ChannelPid, ?PACKET_EVENT_NAT_CHANGED, NatChangedEvent)
|
sdlan_quic_channel:send_event(ChannelPid, ?PACKET_EVENT_NAT_CHANGED, NatChangedEvent)
|
||||||
end, [Mac], Endpoints)
|
end, [Mac], Endpoints)
|
||||||
|
|||||||
@ -105,12 +105,8 @@ handle_info({udp, Sock, Ip, Port, <<?PACKET_STUN_REQUEST:8, Body/binary>>}, Stat
|
|||||||
StunReply = sdlan_pb:encode_msg(#sdl_stun_reply{
|
StunReply = sdlan_pb:encode_msg(#sdl_stun_reply{
|
||||||
cookie = Cookie
|
cookie = Cookie
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
|
||||||
logger:debug("[sdlan_stun] xyz, reply size: ~p", [byte_size(StunReply)]),
|
|
||||||
|
|
||||||
ok = gen_udp:send(Sock, Ip, Port, <<?PACKET_STUN_REPLY:8, StunReply/binary>>),
|
ok = gen_udp:send(Sock, Ip, Port, <<?PACKET_STUN_REPLY:8, StunReply/binary>>),
|
||||||
logger:debug("[sdlan_stun] stun_request network_id: ~p, client_id: ~p, hole: ~p, bytes: ~p", [NetworkId, ClientId, {Ip, Port}, byte_size(<<?PACKET_STUN_REPLY, StunReply/binary>>)])
|
logger:debug("[sdlan_stun] stun_request network_id: ~p, client_id: ~p, hole: ~p", [NetworkId, ClientId, {Ip, Port}])
|
||||||
end,
|
end,
|
||||||
{noreply, State};
|
{noreply, State};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user