pool: minor fixes.
This commit is contained in:
parent
d516035473
commit
6cca0aac1c
@ -1114,10 +1114,12 @@ Pool.prototype.handleOpen = co(function* handleOpen(peer) {
|
||||
|
||||
// If we don't have an ack'd
|
||||
// loader yet consider it dead.
|
||||
if (this.peers.load && !this.peers.load.handshake) {
|
||||
assert(this.peers.load.loader);
|
||||
this.peers.load.loader = false;
|
||||
this.peers.load = null;
|
||||
if (!peer.loader) {
|
||||
if (this.peers.load && !this.peers.load.handshake) {
|
||||
assert(this.peers.load.loader);
|
||||
this.peers.load.loader = false;
|
||||
this.peers.load = null;
|
||||
}
|
||||
}
|
||||
|
||||
// If we do not have a loader,
|
||||
@ -1147,6 +1149,8 @@ Pool.prototype.handleClose = co(function* handleClose(peer, connected) {
|
||||
this.resetChain();
|
||||
}
|
||||
|
||||
this.nonces.remove(peer.hostname());
|
||||
|
||||
this.emit('peer close', peer, connected);
|
||||
|
||||
if (!this.loaded)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user