transport timeout on dead process

This commit is contained in:
kepler155c@gmail.com 2018-12-02 18:40:19 -05:00
parent 2517612622
commit c9a42e2502
1 changed files with 4 additions and 1 deletions

View File

@ -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)