without cancel the context

This commit is contained in:
ginuerzh
2025-08-05 20:24:00 +08:00
parent fd9dc6408a
commit 404aaae5f1
8 changed files with 11 additions and 46 deletions
+1 -4
View File
@@ -230,14 +230,11 @@ func (s *defaultService) Serve() error {
ctx = xctx.ContextWithDstAddr(ctx, dstAddr)
}
// clientAddr := srcAddr.String()
// ctx = xctx.ContextWithClientAddr(ctx, xctx.ClientAddr(clientAddr))
clientIP := srcAddr.String()
if h, _, _ := net.SplitHostPort(clientIP); h != "" {
clientIP = h
}
// ctx = xctx.ContextWithHash(ctx, &xctx.Hash{Source: clientIP})
ctx = xctx.ContextWithHash(ctx, &xctx.Hash{Source: clientIP})
for _, rec := range s.options.recorders {
if rec.Record == recorder.RecorderServiceClientAddress {