From ad1b2ad7e9e8335fe9a926efdccab2bd3456df3e Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Tue, 16 Apr 2013 22:25:31 -0700 Subject: [PATCH] Only call the orginal method once --- lib/model.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/model.js b/lib/model.js index 622f8246..9bd7f2f6 100644 --- a/lib/model.js +++ b/lib/model.js @@ -260,7 +260,7 @@ function stillConnecting(schema, obj, args) { if (schema.connected) return false; if (schema.connecting) return true; var method = args.callee; - schema.on('connected', function () { + schema.once('connected', function () { method.apply(obj, [].slice.call(args)); }); schema.connect();