peer: cleanup events after connect timeout.
This commit is contained in:
parent
bb11cfc021
commit
4f8e401dbc
@ -390,6 +390,7 @@ Peer.prototype.initConnect = function initConnect() {
|
||||
|
||||
self.connectTimeout = setTimeout(function() {
|
||||
self.connectTimeout = null;
|
||||
cleanup();
|
||||
reject(new Error('Connection timed out.'));
|
||||
}, 10000);
|
||||
});
|
||||
@ -621,7 +622,7 @@ Peer.prototype.isLoader = function isLoader() {
|
||||
|
||||
/**
|
||||
* Broadcast blocks to peer.
|
||||
* @param {AbstractBlock[]} blocks
|
||||
* @param {Block[]} blocks
|
||||
*/
|
||||
|
||||
Peer.prototype.announceBlock = function announceBlock(blocks) {
|
||||
@ -707,6 +708,7 @@ Peer.prototype.announceTX = function announceTX(txs) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Check the fee filter.
|
||||
if (this.feeRate !== -1 && this.mempool) {
|
||||
hash = tx.hash('hex');
|
||||
entry = this.mempool.getEntry(hash);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user