1
0
mirror of https://github.com/freifunk-gluon/packages.git synced 2024-06-20 23:58:29 +02:00

wgpeerselector: fix undefined variable peer

Signed-off-by: Florian Maurer <f.maurer@outlook.de>
This commit is contained in:
Florian Maurer 2024-01-18 01:33:53 +01:00 committed by David Bauer
parent 53ea3b8977
commit 3d08b0fee8

View File

@ -380,7 +380,7 @@ function WGPeerSelector:main()
if self:try_connect_to_peer(peer, timeout) then
connected_peer = peer
log(syslog.LOG_INFO, 'Connection established with '..peer.name..'.')
log(syslog.LOG_INFO, 'Connection established with '..connected_peer.name..'.')
end
elseif state == 'established' then
@ -388,8 +388,8 @@ function WGPeerSelector:main()
if not connected_peer:has_recent_handshake() then
connected_peer:uninstall_from_kernel()
log(syslog.LOG_INFO, 'Connection to '..connected_peer.name..' lost.')
connected_peer = nil
log(syslog.LOG_INFO, 'Connection to '..peer.name..' lost.')
else
-- check connections every 5 seconds
sleep(5)