protected network services

This commit is contained in:
kepler155c@gmail.com
2019-04-20 13:48:13 -04:00
parent 62a3bc1360
commit 7749e14cad
6 changed files with 83 additions and 54 deletions

View File

@@ -106,8 +106,12 @@ Event.addRoutine(function()
Event.addRoutine(function()
print('snmp: connection from ' .. socket.dhost)
snmpConnection(socket)
local s, m = pcall(snmpConnection, socket)
print('snmp: closing connection to ' .. socket.dhost)
if not s and m then
print('snmp error')
_G.printError(m)
end
end)
end
end)