mirror of https://github.com/BTCPrivate/copay.git
update timestamp *after* processing messages
This commit is contained in:
parent
ad4ebfdc3c
commit
534a5f6349
|
@ -317,10 +317,10 @@ Wallet.prototype._onData = function(senderId, data, ts) {
|
||||||
preconditions.checkArgument(ts);
|
preconditions.checkArgument(ts);
|
||||||
preconditions.checkArgument(typeof ts === 'number');
|
preconditions.checkArgument(typeof ts === 'number');
|
||||||
|
|
||||||
this.updateTimestamp(ts);
|
|
||||||
|
|
||||||
if (data.type !== 'walletId' && this.id !== data.walletId) {
|
if (data.type !== 'walletId' && this.id !== data.walletId) {
|
||||||
this.emit('corrupt', senderId);
|
this.emit('corrupt', senderId);
|
||||||
|
this.updateTimestamp(ts);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -356,6 +356,7 @@ Wallet.prototype._onData = function(senderId, data, ts) {
|
||||||
this._onDisconnect(senderId, data);
|
this._onDisconnect(senderId, data);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
this.updateTimestamp(ts);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue