fix NPE
This commit is contained in:
parent
30ac8b09c2
commit
edb85cfdd8
3 changed files with 6 additions and 2 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -9,5 +9,5 @@
|
|||
/.project
|
||||
/.gradle
|
||||
/build
|
||||
/out
|
||||
out
|
||||
*~
|
|
@ -71,6 +71,10 @@ test {
|
|||
}
|
||||
}
|
||||
|
||||
clean {
|
||||
delete 'out'
|
||||
}
|
||||
|
||||
asciidoctor {
|
||||
attributes toc: 'left',
|
||||
doctype: 'book',
|
||||
|
|
|
@ -104,7 +104,7 @@ public final class Client {
|
|||
this.http2ResponseHandler = new Http2ResponseHandler();
|
||||
this.transports = new CopyOnWriteArrayList<>();
|
||||
List<HttpAddress> nodes = clientConfig.getNodes();
|
||||
if (!nodes.isEmpty()) {
|
||||
if (nodes != null && !nodes.isEmpty()) {
|
||||
Integer limit = clientConfig.getNodeConnectionLimit();
|
||||
if (limit == null || limit > nodes.size()) {
|
||||
limit = nodes.size();
|
||||
|
|
Loading…
Reference in a new issue