Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
nowjs.options.clientWrite was suppressing nowjs#connect. Amend this.
  • Loading branch information
steveWang committed Mar 6, 2012
1 parent 12697e9 commit cc73280
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/user.js
Expand Up @@ -138,12 +138,6 @@ exports.initialize = function (nowjs) {
}
});

// Called after initial scope sent. Ready handler
socket.on('rd', function rdHandler() {
var user = nowUtil.clone(self, {'_events': nowjs._events});
nowjs.emit.call(user, 'connect');
});

// Variable deletion handler
socket.on('del', function rfcHandler(data) {
// Takes an array of fqns to delete.
Expand All @@ -156,6 +150,12 @@ exports.initialize = function (nowjs) {
});
}

// Called after initial scope sent. Ready handler
socket.on('rd', function rdHandler() {
var user = nowUtil.clone(self, {'_events': nowjs._events});
nowjs.emit.call(user, 'connect');
});

socket.on('disconnect', function () {
var user = nowUtil.clone(self, {'_events': nowjs._events});

Expand Down

0 comments on commit cc73280

Please sign in to comment.