refactor (remove TimeoutOnly)

This commit is contained in:
Meo597
2026-07-08 21:44:22 +08:00
parent b53f8b56a4
commit 723ef2b8e6
14 changed files with 14 additions and 71 deletions
-4
View File
@@ -388,10 +388,6 @@ func (h *Handler) Process(ctx context.Context, link *transport.Link, dialer inte
defer conn.Close()
errors.LogInfo(ctx, "connection opened to ", destination, ", local endpoint ", conn.LocalAddr(), ", remote endpoint ", conn.RemoteAddr())
if session.TimeoutOnlyFromContext(ctx) {
ctx = context.WithoutCancel(ctx)
}
plcy := h.policy()
ctx, cancel := context.WithCancel(ctx)
timer := signal.CancelAfterInactivity(ctx, cancel, plcy.Timeouts.ConnectionIdle)