mirror of https://github.com/v2ray/v2ray-core
refactor udp worker
parent
e5d3783ed7
commit
59958fed68
|
@ -211,7 +211,9 @@ func (w *udpWorker) getConnection(id connID) (*udpConn, bool) {
|
||||||
func (w *udpWorker) callback(b *buf.Buffer, source net.Destination, originalDest net.Destination) {
|
func (w *udpWorker) callback(b *buf.Buffer, source net.Destination, originalDest net.Destination) {
|
||||||
id := connID{
|
id := connID{
|
||||||
src: source,
|
src: source,
|
||||||
dest: originalDest,
|
}
|
||||||
|
if originalDest.IsValid() {
|
||||||
|
id.dest = originalDest
|
||||||
}
|
}
|
||||||
conn, existing := w.getConnection(id)
|
conn, existing := w.getConnection(id)
|
||||||
select {
|
select {
|
||||||
|
|
Loading…
Reference in New Issue