1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-12-27 04:25:44 -05:00

clean up dns package

This commit is contained in:
Darien Raymond
2017-11-15 00:36:14 +01:00
parent a430e2065a
commit 0dbfb66126
16 changed files with 225 additions and 79 deletions

View File

@@ -64,7 +64,9 @@ func (d *DokodemoDoor) Process(ctx context.Context, network net.Network, conn in
if timeout == 0 {
timeout = time.Minute * 5
}
ctx, timer := signal.CancelAfterInactivity(ctx, timeout)
ctx, cancel := context.WithCancel(ctx)
timer := signal.CancelAfterInactivity(ctx, cancel, timeout)
inboundRay, err := dispatcher.Dispatch(ctx, dest)
if err != nil {