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: Remove udp connection twice(#1297) #1305

Merged
merged 2 commits into from
Sep 30, 2021

Conversation

Ovear
Copy link
Contributor

@Ovear Ovear commented Sep 28, 2021

Fix #1297

@codecov-commenter
Copy link

codecov-commenter commented Sep 29, 2021

Codecov Report

Merging #1305 (c6a4e3a) into master (deb9d08) will decrease coverage by 0.09%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1305      +/-   ##
==========================================
- Coverage   44.64%   44.54%   -0.10%     
==========================================
  Files         485      485              
  Lines       29534    29540       +6     
==========================================
- Hits        13184    13158      -26     
- Misses      14945    14971      +26     
- Partials     1405     1411       +6     
Impacted Files Coverage Δ
app/proxyman/inbound/worker.go 37.15% <0.00%> (-0.91%) ⬇️
transport/internet/udp/dispatcher.go 64.76% <0.00%> (-12.39%) ⬇️
common/buf/reader.go 82.35% <0.00%> (-5.89%) ⬇️
proxy/freedom/freedom.go 45.00% <0.00%> (-4.00%) ⬇️
transport/internet/websocket/connection.go 16.51% <0.00%> (-3.67%) ⬇️
transport/pipe/impl.go 87.87% <0.00%> (-2.03%) ⬇️
common/drain/drainer.go 72.41% <0.00%> (+6.89%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update deb9d08...c6a4e3a. Read the comment docs.

nekohasekai pushed a commit to SagerNet/v2ray-core that referenced this pull request Sep 29, 2021
Copy link
Contributor

@xiaokangwang xiaokangwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank for your explanation. I have understood the root cause of this error, and I agree with the way this issue is addressed.

The connID(Connection identifier ,app/proxyman/inbound/worker.go:type connID struct) use the connection source and destination to identify different connections. When a inactive connection is removed for inactivity, the new connection that is created later may also be removed as the transport connection is terminate. In this way, the new transport connection and tracked active connection get removed unnecessarily.

This pull request is ready to be merged.

Thanks for your contribution.

@xiaokangwang xiaokangwang merged commit b3e0d54 into v2fly:master Sep 30, 2021
xiaokangwang pushed a commit that referenced this pull request Sep 30, 2021
(cherry picked from commit 75eead5)

See Also: #1305
#1297
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

proxyman/inbound/udpWorker在部分场景中会不断重复断开、建立链接
3 participants