Skip to content

Akka.IO: TcpConnection does not propagate closure events reliably #7634

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Aaronontheweb opened this issue May 12, 2025 · 2 comments · May be fixed by #7637
Open

Akka.IO: TcpConnection does not propagate closure events reliably #7634

Aaronontheweb opened this issue May 12, 2025 · 2 comments · May be fixed by #7637

Comments

@Aaronontheweb
Copy link
Member

Version Information
Version of Akka.NET? v1.5.41
Which Akka.NET Modules? Akka.IO

Describe the bug

Yet another Akka.IO bug - while working on #7633 I tried to tests to verify that we can track connection closures, but there's a small problem: the TcpConnection actor doesn't reliably transmit this information.

Expected behavior

If the remote socket gets closed, the local socket should close and report back to its handler immediately.

Actual behavior

Wildly different stuff depending on how the socket was closed. Sometimes an event, usually not.

Additional context

This code is wildly over-engineered and is in drastic need of cleanup.

@Aaronontheweb Aaronontheweb added this to the 1.5.42 milestone May 12, 2025
Aaronontheweb added a commit to Aaronontheweb/akka.net that referenced this issue May 12, 2025
Aaronontheweb added a commit that referenced this issue May 12, 2025
* Akka.IO: added `TcpListenerStatistics` and subscription methods

This enables the `Akka.IO.TcpListener` to periodically publish connectivity statistics to subscribers on `10s` intervals - designed to help create telemetry for servers built on top of Akka.IO.

close #7631

* added documentation

* remove duplicate `ConnectionTerminated`

* tried to add closure check but ran into #7634
@Aaronontheweb Aaronontheweb linked a pull request May 13, 2025 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@Aaronontheweb and others