work towards connection error

This commit is contained in:
Manuel Araoz 2014-06-02 15:14:28 -03:00
commit 7b2f227bcc
3 changed files with 3 additions and 14 deletions

View file

@ -63,9 +63,7 @@ Wallet.prototype.seedCopayer = function(pubKey) {
Wallet.prototype.connectToAll = function() {
console.log('[Wallet.js.57]'); //TODO
var all = this.publicKeyRing.getAllCopayerIds();
console.log('[Wallet.js.58] connecting'); //TODO
this.network.connectToCopayers(all);
if (this.seededCopayerId) {
@ -224,8 +222,8 @@ Wallet.prototype.netStart = function() {
self.log('[Wallet.js.132:openError:] GOT openError'); //TODO
self.emit('openError');
});
net.on('error', function(){
self.emit('connectionError'); // Bubble the error
net.on('error', function() {
self.emit('connectionError');
});
net.on('close', function() {
self.emit('close');

View file

@ -269,7 +269,6 @@ Network.prototype._setupPeerHandlers = function(openCallback) {
self._checkAnyPeer();
});
p.on('connection', function(dataConn) {
console.log('### NEW INBOUND CONNECTION %d/%d', self.connectedPeers.length, self.maxPeers);
if (self.connectedPeers.length >= self.maxPeers) {