micronaut-projects / micronaut-rxjava3

Integration between Micronaut and RxJava 3
Apache License 2.0
5 stars 3 forks source link

Rx3SseClient got disconnect after 5 mins #317

Open VanKuang opened 11 months ago

VanKuang commented 11 months ago

Expected Behavior

Do not disconnect if server keep sending heartbeat, so the connection should be keep-alive.

Actual Behaviour

The sse client got disconnect after 5 mins, it was trigger by the WriterIdleTimeoutHandler in IdleStateHandler from Netty. The idleStateHandler was added by https://github.com/micronaut-projects/micronaut-core/blob/v3.7.5/http-client/src/main/java/io/micronaut/http/client/netty/ConnectionManager.java#L609

Steps To Reproduce

Here is my client:

Rx3SseClient.create(URL) .eventStream() .subscribe()

Environment Information

No response

Example Application

No response

Version

2.4.1

VanKuang commented 11 months ago

Now I have to make a workaround: set readIdleTimeout to null to let ConnectionManager not adding IdleStateHandler - Which i don't think it is the right thing to do?

sdelamo commented 10 months ago

@VanKuang is this a Micronaut Framework 2 app? Does it happen in Micronaut Framework 4? Do you have a sample project which reproduces the issue?