From c9a42e2502810cc89d764d88466f4c0232b41e09 Mon Sep 17 00:00:00 2001 From: "kepler155c@gmail.com" Date: Sun, 2 Dec 2018 18:40:19 -0500 Subject: [PATCH] transport timeout on dead process --- sys/network/transport.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/network/transport.lua b/sys/network/transport.lua index 48d7a62..2eeb801 100644 --- a/sys/network/transport.lua +++ b/sys/network/transport.lua @@ -79,8 +79,11 @@ Event.on('modem_message', function(_, _, dport, dhost, msg, distance) if socket and socket.connected then --if msg.type then _debug('<< ' .. Util.tostring(msg)) end + if socket.co and coroutine.status(socket.co) == 'dead' then + _G._debug('socket coroutine dead') + socket:close() - if msg.type == 'DISC' then + elseif msg.type == 'DISC' then -- received disconnect from other end if socket.connected then os.queueEvent('transport_' .. socket.uid)