fix invalid msg crashing socket

This commit is contained in:
kepler155c@gmail.com
2018-11-09 15:07:55 -05:00
parent cb03e56a1f
commit 68ee419d83
4 changed files with 5 additions and 4 deletions

View File

@@ -183,7 +183,7 @@ function Socket.server(port)
local _, _, sport, dport, msg = os.pullEvent('modem_message')
if sport == port and
msg and
msg and type(msg) == 'table' and
msg.dhost == os.getComputerID() and
msg.type == 'OPEN' then