diff --git a/app/proxyman/inbound/worker.go b/app/proxyman/inbound/worker.go index 54a717bf8..81d262344 100644 --- a/app/proxyman/inbound/worker.go +++ b/app/proxyman/inbound/worker.go @@ -332,7 +332,7 @@ func (w *udpWorker) clean() error { } for addr, conn := range w.activeConn { - if nowSec-atomic.LoadInt64(&conn.lastActivityTime) > 8 { + if nowSec-atomic.LoadInt64(&conn.lastActivityTime) > 8 { //TODO Timeout too small delete(w.activeConn, addr) conn.Close() // nolint: errcheck } diff --git a/proxy/dokodemo/dokodemo.go b/proxy/dokodemo/dokodemo.go index 227585051..33930cc41 100644 --- a/proxy/dokodemo/dokodemo.go +++ b/proxy/dokodemo/dokodemo.go @@ -188,7 +188,9 @@ func (d *DokodemoDoor) Process(ctx context.Context, network net.Network, conn in return nil } - if err := task.Run(ctx, task.OnSuccess(requestDone, task.Close(link.Writer)), responseDone, tproxyRequest); err != nil { + if err := task.Run(ctx, task.OnSuccess(func() error { + return task.Run(ctx, requestDone, tproxyRequest) + }, task.Close(link.Writer)), responseDone); err != nil { common.Interrupt(link.Reader) common.Interrupt(link.Writer) return newError("connection ends").Base(err)