1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-10 09:50:43 +00:00

refactor udp worker

This commit is contained in:
Darien Raymond 2018-03-01 14:58:13 +01:00
parent e5d3783ed7
commit 59958fed68
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -210,8 +210,10 @@ func (w *udpWorker) getConnection(id connID) (*udpConn, bool) {
func (w *udpWorker) callback(b *buf.Buffer, source net.Destination, originalDest net.Destination) {
id := connID{
src: source,
dest: originalDest,
src: source,
}
if originalDest.IsValid() {
id.dest = originalDest
}
conn, existing := w.getConnection(id)
select {