eclipse-vertx / eclipse-vertx/vert.x

Breaking Change: NetClient.connect() connection timeout behavior changed in Vert.x 5

Open
#5,916 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
14.7k
Forks
2.1k
Avg merge
2d 7h
Merged PRs (30d)
28

Description

### Version

Vert.x 4.x → Vert.x 5.0.7

### Context

When migrating from Vert.x 4 to Vert.x 5, I encountered unexpected connection timeout behavior with `NetClient.connect()`.

## Code that worked in Vert.x 4.x

```java
NetClientOptions options = new NetClientOptions()
.setIdleTimeout(0)
.setTcpKeepAlive(true)
.setTcpNoDelay(true);

NetClient netClient = vertx.createNetClient(options);

// This worked fine in Vert.x 4.x - connection stayed open indefinitely
netClient.connect(socketaddress).onComplete(ar -> {
// handle connection
});
```

## Problem in Vert.x 5

After upgrading to Vert.x 5, the connection automatically disconnects after **60 seconds**, even though `setIdleTimeout(0)` was configured.

## Environment

- **Vert.x Version**: 5.0.7
- **Java Version**: 21
- **OS**: macOS

### Steps to reproduce

_No response_

### Do you have a reproducer?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.