eclipse-vertx/vert.x · error · IllegalArgumentException
connectTimeout must be >= 0
Error message
connectTimeout must be >= 0
What it means
Configuration validation in QuicClientConfig.setConnectTimeout: the QUIC connect timeout Duration must be non-negative (Duration.isNegative() is rejected; zero disables the timeout). The input at fault is the Duration passed to the setter.
Source
Thrown at vertx-core/src/main/java/io/vertx/core/net/QuicClientConfig.java:138
return (QuicServerConfig) super.setReuseAddress(reuseAddress);
}
/**
* @return the value of connect timeout
*/
public Duration getConnectTimeout() {
return connectTimeout;
}
/**
* Set the connect timeout, the value must be greater or equals than zero, use {@code 0} to disable timeout.
*
* @param connectTimeout connect timeout
* @return a reference to this, so the API can be used fluently
*/
public QuicClientConfig setConnectTimeout(Duration connectTimeout) {
if (connectTimeout.isNegative()) {
throw new IllegalArgumentException("connectTimeout must be >= 0");
}
this.connectTimeout = connectTimeout;
return this;
}
/**
* @return the local address to bind for network connections.
*/
public SocketAddress getLocalAddress() {
return localAddress;
}
/**
* Set the local address to bind for network connections. When the local address is null,
* it will pick any local address, the default local address is null.
*
* @param localAddress the local address
* @return a reference to this, so the API can be used fluentlyView on GitHub (pinned to fb308bd8c3)
Solutions
- Use a zero or positive Duration (0 disables the timeout)
- Validate Duration configuration before building the QUIC client
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at vertx-core/src/main/java/io/vertx/core/net/QuicClientConfig.java:138 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
AI-assisted analysis of eclipse-vertx/vert.x@fb308bd8c3 (2026-09-06).
Data as JSON: /api/errors/e4226aa8a77f55ae.
Report an issue: GitHub.