Merge pull request #1299 from matiaspando/error/fixLostMessages

Subscribe again to receive messages
This commit is contained in:
Matias Alejo Garcia 2014-09-08 15:13:17 -03:00
commit b15ddf23c4
1 changed files with 2 additions and 1 deletions

View File

@ -235,7 +235,8 @@ Network.prototype._setupConnectionHandlers = function(cb) {
self.socket.on('connect', function() {
self.socket.on('disconnect', function() {
self.cleanUp();
var pubKey = self.getKey().public.toString('hex');
self.socket.emit('subscribe', pubKey);
});
if (typeof cb === 'function') cb();