Updated mp_broadcast.nas: Added missing var keyword.
This commit is contained in:
parent
21ae0c8c69
commit
ee5eceb3da
1 changed files with 19 additions and 18 deletions
|
@ -45,24 +45,25 @@ BroadcastChannel.new = func (mpp_path, process,
|
||||||
accept_predicate = nil,
|
accept_predicate = nil,
|
||||||
on_disconnect = nil,
|
on_disconnect = nil,
|
||||||
enable_send=1) {
|
enable_send=1) {
|
||||||
obj = { parents : [BroadcastChannel],
|
var obj = { parents : [BroadcastChannel],
|
||||||
mpp_path : mpp_path,
|
mpp_path : mpp_path,
|
||||||
send_node : enable_send ? props.globals.getNode(mpp_path, 1)
|
send_node : enable_send ? props.globals.getNode(mpp_path, 1)
|
||||||
: nil,
|
: nil,
|
||||||
process_msg : process,
|
process_msg : process,
|
||||||
send_to_self : send_to_self,
|
send_to_self : send_to_self,
|
||||||
accept_predicate : (accept_predicate != nil) ? accept_predicate :
|
accept_predicate :
|
||||||
func (p) { return 1; },
|
(accept_predicate != nil) ? accept_predicate
|
||||||
on_disconnect : (on_disconnect != nil) ? on_disconnect :
|
: func (p) { return 1; },
|
||||||
func (p) { return; },
|
on_disconnect : (on_disconnect != nil) ? on_disconnect
|
||||||
# Internal state.
|
: func (p) { return; },
|
||||||
send_buf : [],
|
# Internal state.
|
||||||
peers : {},
|
send_buf : [],
|
||||||
loopid : 0,
|
peers : {},
|
||||||
PERIOD : 1.3,
|
loopid : 0,
|
||||||
last_time : 0.0, # For join handling.
|
PERIOD : 1.3,
|
||||||
last_send : 0.0, # For the send queue
|
last_time : 0.0, # For join handling.
|
||||||
SEND_TIME : 0.5 };
|
last_send : 0.0, # For the send queue
|
||||||
|
SEND_TIME : 0.5 };
|
||||||
if (enable_send and (obj.send_node == nil)) {
|
if (enable_send and (obj.send_node == nil)) {
|
||||||
printlog("warn",
|
printlog("warn",
|
||||||
"BroadcastChannel invalid send node.");
|
"BroadcastChannel invalid send node.");
|
||||||
|
|
Loading…
Reference in a new issue