Skip to content

UDP: faster close (in some rare situations)#4909

Closed
patterniha wants to merge 1 commit intoXTLS:mainfrom
patterniha:better-close
Closed

UDP: faster close (in some rare situations)#4909
patterniha wants to merge 1 commit intoXTLS:mainfrom
patterniha:better-close

Conversation

@patterniha
Copy link
Collaborator

@Fangliding
Copy link
Member

那么多没合呢要不你还是消停会

@Fangliding Fangliding closed this Jul 19, 2025
@patterniha
Copy link
Collaborator Author

patterniha commented Jul 19, 2025

also, If this happens, we handle the new received packet incorrectly, because we create a new outbound connection but we ignore it !

so we should run conn.updateActivity() in udpWorker lock:

if conn, found := w.activeConn[id]; found && !conn.done.Done() {
		conn.updateActivity()
		return conn, true
}

@patterniha
Copy link
Collaborator Author

I managed to produce an example(with two interface) where udpConn is closed but connEntry is not closed, so this PR should be merged to fix this (rare) situation.

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.

2 participants