No reannouncing self

Signed-off-by: Rahix <rahix@rahix.de>
This commit is contained in:
rahix 2019-04-16 22:37:06 +02:00
parent 28a52cfd7d
commit c6f019f271

19
bc.lua
View file

@ -147,14 +147,17 @@ function BaseControl:finalize(waits, timeout)
self = BaseControl:new()
end
-- Announce own nouns and verbs
local nouns, verbs = self:nouns(true), self:verbs(true)
if #nouns > 0 or #verbs > 0 then
self.network:broadcast{
ty=Message.Register,
nouns=nouns,
verbs=verbs,
}
-- Announce own nouns and verbs if this is the first
-- call to finalize() and we have registered names
if not self.live then
local nouns, verbs = self:nouns(true), self:verbs(true)
if #nouns > 0 or #verbs > 0 then
self.network:broadcast{
ty=Message.Register,
nouns=nouns,
verbs=verbs,
}
end
end
if #(waits or {}) ~= 0 then