{"record":{"id":"e4226aa8a77f55ae","repo":"eclipse-vertx/vert.x","slug":"connecttimeout-must-be-0-e4226a","errorCode":null,"errorMessage":"connectTimeout must be >= 0","messagePattern":"connectTimeout must be >= 0","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"vertx-core/src/main/java/io/vertx/core/net/QuicClientConfig.java","lineNumber":138,"sourceCode":"    return (QuicServerConfig) super.setReuseAddress(reuseAddress);\n  }\n\n  /**\n   * @return the value of connect timeout\n   */\n  public Duration getConnectTimeout() {\n    return connectTimeout;\n  }\n\n  /**\n   * Set the connect timeout, the value must be greater or equals than zero, use {@code 0} to disable timeout.\n   *\n   * @param connectTimeout  connect timeout\n   * @return a reference to this, so the API can be used fluently\n   */\n  public QuicClientConfig setConnectTimeout(Duration connectTimeout) {\n    if (connectTimeout.isNegative()) {\n      throw new IllegalArgumentException(\"connectTimeout must be >= 0\");\n    }\n    this.connectTimeout = connectTimeout;\n    return this;\n  }\n\n  /**\n   * @return the local address to bind for network connections.\n   */\n  public SocketAddress getLocalAddress() {\n    return localAddress;\n  }\n\n  /**\n   * Set the local address to bind for network connections. When the local address is null,\n   * it will pick any local address, the default local address is null.\n   *\n   * @param localAddress the local address\n   * @return a reference to this, so the API can be used fluently","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/eclipse-vertx/vert.x/blob/fb308bd8c3f12c79f4ae89bef67fadf6c80d036e/vertx-core/src/main/java/io/vertx/core/net/QuicClientConfig.java#L120-L156","documentation":"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.","triggerScenarios":"Thrown at vertx-core/src/main/java/io/vertx/core/net/QuicClientConfig.java:138 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a zero or positive Duration (0 disables the timeout)","Validate Duration configuration before building the QUIC client"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fb308bd8c3f12c79f4ae89bef67fadf6c80d036e","analyzedAt":"2026-09-06T11:37:12.241Z","contentChangedAt":"2026-09-06T11:37:12.241Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}