diff --git a/source/tools/monitor/unity/collector/outline/pipeMon.lua b/source/tools/monitor/unity/collector/outline/pipeMon.lua index 81f2069698ef18cb43d89eff15d38ae33415f5bf..ba26bf0c7a570d7cb3ea7f7363a1129213d752df 100644 --- a/source/tools/monitor/unity/collector/outline/pipeMon.lua +++ b/source/tools/monitor/unity/collector/outline/pipeMon.lua @@ -35,20 +35,22 @@ end function CpipeMon:setupPipe(fYaml) local res = system:parseYaml(fYaml) - for i, path in ipairs(res.outline) do - if unistd.access(path) then - unistd.unlink(path) - end - self._paths[i] = path - - socket.unix = require("socket.unix") - local s = socket.unix.udp() - if s then - s:bind(path) - print("bind " .. path) - table.insert(self._socks, s) - else - error("create udp pipe failed.") + if res.outline then + for i, path in ipairs(res.outline) do + if unistd.access(path) then + unistd.unlink(path) + end + self._paths[i] = path + + socket.unix = require("socket.unix") + local s = socket.unix.udp() + if s then + s:bind(path) + print("bind " .. path) + table.insert(self._socks, s) + else + error("create udp pipe failed.") + end end end end