From 534a5f6349065320395ffa504cfe4827daffa95a Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Thu, 28 Aug 2014 18:05:29 -0300 Subject: [PATCH] update timestamp *after* processing messages --- js/models/core/Wallet.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/models/core/Wallet.js b/js/models/core/Wallet.js index 86ac1f3ae..3a31bc4e0 100644 --- a/js/models/core/Wallet.js +++ b/js/models/core/Wallet.js @@ -317,10 +317,10 @@ Wallet.prototype._onData = function(senderId, data, ts) { preconditions.checkArgument(ts); preconditions.checkArgument(typeof ts === 'number'); - this.updateTimestamp(ts); if (data.type !== 'walletId' && this.id !== data.walletId) { this.emit('corrupt', senderId); + this.updateTimestamp(ts); return; } @@ -356,6 +356,7 @@ Wallet.prototype._onData = function(senderId, data, ts) { this._onDisconnect(senderId, data); break; } + this.updateTimestamp(ts); };