Skip to content
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

fix: connection leaks #624

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

fix: connection leaks #624

wants to merge 4 commits into from

Conversation

mzz2017
Copy link
Contributor

@mzz2017 mzz2017 commented Sep 8, 2024

Background

Many users have reported continuous memory growth in dae, possibly due to coroutine leaks.

This phenomenon is even more obvious when the network is disconnected. A very suspicious object is that our dialer does not implement DialContext, resulting in the timeout mechanism not being triggered when calling down.

This PR attempts to fix this problem.

image

Checklist

Full Changelogs

  • Implement DialContext for dialers.
  • Close misclosed underlay UDP connection for tuic/juicity.

Issue Reference

Closes #[issue number]

Test Result

@dae-prow
Copy link
Contributor

dae-prow bot commented Sep 17, 2024

❌ Your branch is currently out-of-sync to main. No worry, I will fix it for you.

@mzz2017 mzz2017 changed the title fix: implement DialContext for dialers to reduce the risk of leaks fix: connection leaks Sep 18, 2024
@dae-prow
Copy link
Contributor

dae-prow bot commented Sep 18, 2024

❌ Your branch is currently out-of-sync to main. No worry, I will fix it for you.

@QiuSimons
Copy link

这个patch甚至解决了在低性能arm机型上,当dae的上游dns是udp协议的时候,暴力用dnsbenchmark会导致dae死透,dns无响应的问题
btw,这两个commit,需要在wing那边做对应适配(dae-wing/dae/run.go#L139)
c3c06c4
768595b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants