diff --git a/src/component/modem.lua b/src/component/modem.lua index b8f60e3..63da3b6 100644 --- a/src/component/modem.lua +++ b/src/component/modem.lua @@ -189,12 +189,6 @@ function modem_host.dispatchPacket(packet) end function modem_host.processPendingMessages() - -- computer address seems to be applied late - if not modem_host.id then - modem_host.id = component.list("computer",true)() - assert(modem_host.id) - end - -- do not try to process anything if this machine is not even connected to a message board -- not wrong without this, this is a simple optimization if not modem_host.connected then @@ -336,6 +330,12 @@ function modem_host.connectMessageBoard() modem_host.clients = {} modem_host.messages = {} + -- computer address seems to be applied late + if not modem_host.id then + modem_host.id = component.list("computer",true)() + assert(modem_host.id) + end + return true end