Skip to content

Commit e05cfb4

Browse files
committed
JAVA-397: authentication for replica set fails frequently because 'getnonce' and 'authenticate' command is issued to different server
1 parent c3a360c commit e05cfb4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/com/mongodb/DB.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,11 +493,11 @@ static DBObject _authCommand( String nonce , String username , byte[] hash ){
493493
}
494494

495495
private CommandResult _doauth( String username , byte[] hash ){
496-
CommandResult res = command(new BasicDBObject("getnonce", 1), getOptions());
496+
CommandResult res = command(new BasicDBObject("getnonce", 1));
497497
res.throwOnError();
498498

499499
DBObject cmd = _authCommand( res.getString( "nonce" ) , username , hash );
500-
return command(cmd, getOptions());
500+
return command(cmd);
501501
}
502502

503503
/**

0 commit comments

Comments
 (0)