Signed-off-by: Rahix <rahix@rahix.de>
dev
rahix 7 years ago
parent 2b935b87e4
commit 11babfad9e

@ -83,7 +83,7 @@ function Network:pull(filter, timeout)
if ev ~= nil then
return last_msg
else
return nil, "timeout"
return nil
end
end
@ -118,7 +118,6 @@ function BaseControl:new(network)
self.network:start(function(remote, msg)
self:_network_handler(remote, msg)
end)
-- Announce own presence so registers start coming in
self.network:broadcast{ty=Message.Hello}
return self
@ -150,9 +149,7 @@ function BaseControl:register(name, value)
end
function BaseControl:finalize(waits, timeout)
local self = self
if self == BaseControl then
-- Called as a constructor
self = BaseControl:new()
end
@ -167,6 +164,7 @@ function BaseControl:finalize(waits, timeout)
verbs=verbs,
}
end
self.live = true
end
if #(waits or {}) ~= 0 then
@ -210,7 +208,6 @@ function BaseControl:finalize(waits, timeout)
end
end
self.live = true
return self
end
@ -228,7 +225,6 @@ function BaseControl:close()
end
self.network:stop()
setmetatable(self, nil)
end
-- }}}
@ -505,8 +501,6 @@ function BaseControl:_network_handler(remote, msg)
self.listeners[msg.noun][msg.id] = nil
end
end
else
error("TODO: MessageType Unknown")
end
end
-- }}}

Loading…
Cancel
Save