From b9fedc2da907e701e2fcc62c81de7ef31bd3ecf5 Mon Sep 17 00:00:00 2001 From: payonel Date: Thu, 3 Sep 2015 20:38:06 -0700 Subject: [PATCH] move address load a bit earlier in time for first use --- src/component/modem.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/component/modem.lua b/src/component/modem.lua index 4b9e218..7119f15 100644 --- a/src/component/modem.lua +++ b/src/component/modem.lua @@ -311,6 +311,12 @@ function modem_host.connectMessageBoard() return true end + -- computer address seems to be applied late + if modem_host.id == nil then + modem_host.id = component.list("computer",true)() + assert(modem_host.id) + end + local ok, info, critical = modem_host.joinExistingMessageBoard() if not ok and critical then @@ -330,12 +336,6 @@ function modem_host.connectMessageBoard() modem_host.clients = {} modem_host.messages = {} - -- computer address seems to be applied late - if modem_host.id == nil then - modem_host.id = component.list("computer",true)() - assert(modem_host.id) - end - return true end