Fix check for session equivalence

This check didn't work, which resulted in closing and then immediately
reopening the current session. Not that big a deal, since it merely
flips a flag off and back on again just before saving the session
record, but does result in spurious log statements.
This commit is contained in:
lilia 2017-04-12 11:54:11 -07:00
parent b77842c30e
commit b0ed2e5e4f
2 changed files with 2 additions and 2 deletions

View File

@ -36177,7 +36177,7 @@ SessionCipher.prototype = {
var errors = [];
return this.decryptWithSessionList(buffer, record.getSessions(), errors).then(function(result) {
return this.getRecord(address).then(function(record) {
if (result.session !== record.getOpenSession()) {
if (result.session.indexInfo.baseKey !== record.getOpenSession().indexInfo.baseKey) {
record.archiveCurrentState();
record.promoteState(result.session);
}

View File

@ -143,7 +143,7 @@ SessionCipher.prototype = {
var errors = [];
return this.decryptWithSessionList(buffer, record.getSessions(), errors).then(function(result) {
return this.getRecord(address).then(function(record) {
if (result.session !== record.getOpenSession()) {
if (result.session.indexInfo.baseKey !== record.getOpenSession().indexInfo.baseKey) {
record.archiveCurrentState();
record.promoteState(result.session);
}