Only call the orginal method once
This commit is contained in:
parent
3eb6869174
commit
ad1b2ad7e9
|
@ -260,7 +260,7 @@ function stillConnecting(schema, obj, args) {
|
||||||
if (schema.connected) return false;
|
if (schema.connected) return false;
|
||||||
if (schema.connecting) return true;
|
if (schema.connecting) return true;
|
||||||
var method = args.callee;
|
var method = args.callee;
|
||||||
schema.on('connected', function () {
|
schema.once('connected', function () {
|
||||||
method.apply(obj, [].slice.call(args));
|
method.apply(obj, [].slice.call(args));
|
||||||
});
|
});
|
||||||
schema.connect();
|
schema.connect();
|
||||||
|
|
Loading…
Reference in New Issue