change locking order

This commit is contained in:
Matias Alejo Garcia 2014-04-28 15:15:09 -03:00
commit 8138eaed7b

View file

@ -53,12 +53,12 @@ Wallet.prototype._handlePublicKeyRing = function(senderId, data, isInbound) {
var hasChanged = pkr.merge(inPKR, true); var hasChanged = pkr.merge(inPKR, true);
if (hasChanged) { if (hasChanged) {
this.log('### BROADCASTING PKR');
recipients = null;
this.sendPublicKeyRing(recipients);
if (this.publicKeyRing.isComplete()) { if (this.publicKeyRing.isComplete()) {
this._lockIncomming(); this._lockIncomming();
} }
this.log('### BROADCASTING PKR');
recipients = null;
this.sendPublicKeyRing(recipients);
} }
this.emit('publicKeyRingUpdated', this.publicKeyRing); this.emit('publicKeyRingUpdated', this.publicKeyRing);
this.store(); this.store();