Skip to content

Commit 431c1a2

Browse files
author
ehennum
committed
minimum hosts must be 1 for primary host connection #999
1 parent 538b01e commit 431c1a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

marklogic-client-api/src/main/java/com/marklogic/client/datamovement/HostAvailabilityListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public HostAvailabilityListener withSuspendTimeForHostUnavailable(Duration
133133
*/
134134
public HostAvailabilityListener withMinHosts(int numHosts) {
135135
if (moveMgr.getConnectionPolicy() == DatabaseClient.ConnectionPolicy.PRIMARY_HOST) {
136-
if (numHosts != 0) {
136+
if (numHosts != 1) {
137137
throw new IllegalArgumentException("numHosts must be 1 when using only the primary host for the connection");
138138
}
139139
} else {

0 commit comments

Comments
 (0)