handle no-messages

This commit is contained in:
Matias Alejo Garcia 2014-08-28 18:43:04 -03:00
commit 9888bc9448
2 changed files with 12 additions and 1 deletions

View file

@ -220,6 +220,8 @@ Network.prototype._setupConnectionHandlers = function(cb) {
});
self.socket.on('error', self._onError.bind(self));
self.socket.on('no messages', self.bind(self, 'no messages'));
self.socket.on('connect', function() {
self.socket.on('disconnect', function() {
@ -302,6 +304,7 @@ Network.prototype.start = function(opts, openCallback) {
}, 500);
});
self.socket.emit('sync', opts.lastTimestamp);
self.started = true;
};