mirror of https://github.com/aredn/aredn.git
Improve history matching as poor history entries could break "Previous Neighbors" (#307)
This commit is contained in:
parent
a716167fa1
commit
ce2f47e06d
|
@ -399,8 +399,8 @@ end
|
|||
if nixio.fs.stat("/tmp/node.history") then
|
||||
for line in io.lines("/tmp/node.history")
|
||||
do
|
||||
local ip, age, host = line:match("^(.*) (.*) (.*)")
|
||||
if age then
|
||||
local ip, age, host = line:match("^(.+) (%d+) (.*)")
|
||||
if ip and age and host then
|
||||
history[ip] = { age = age, host = host:gsub("/", " / ") }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue