refactor udp worker

pull/931/head
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
1 changed files with 4 additions and 2 deletions

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 {