Only call the orginal method once

This commit is contained in:
Raymond Feng 2013-04-16 22:25:31 -07:00
parent 3eb6869174
commit ad1b2ad7e9
1 changed files with 1 additions and 1 deletions

View File

@ -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();