From e19818604f5b57ff6413531747e12c5ef09f25bf Mon Sep 17 00:00:00 2001 From: Aaron Date: Tue, 28 Apr 2009 13:56:58 -0400 Subject: precise slave state check --- shell/servers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'shell/servers.js') diff --git a/shell/servers.js b/shell/servers.js index c3ee9d286be..7530854c1f4 100644 --- a/shell/servers.js +++ b/shell/servers.js @@ -249,12 +249,12 @@ ReplPair.prototype.checkSteadyState = function( leftValues, rightValues ) { rightValues[ rm ] = true; } - if ( rm == 1 ) { + if ( rm == 1 && ( lm == null || lm == 0 ) ) { assert( !( 1 in leftValues ) ); this.master_ = this.rightC_; this.slave_ = this.leftC_; return true; - } else if ( lm == 1 ) { + } else if ( lm == 1 && ( rm == null || rm == 0 ) ) { assert( !( 1 in rightValues ) ); this.master_ = this.leftC_; this.slave_ = this.rightC_; -- cgit v1.2.1