This is an automated email from the ASF dual-hosted git repository.
liuhan pushed a commit to branch fix-protocol-lost
in repository https://gitbox.apache.org/repos/asf/skywalking-rover.git
The following commit(s) were added to refs/heads/fix-protocol-lost by this push:
new 9363d03 added a delay time for delete connection
9363d03 is described below
commit 9363d03cc9fe11682df3e862a9ef40080d8aa75d
Author: mrproliu <[email protected]>
AuthorDate: Wed Nov 13 23:45:25 2024 +0900
added a delay time for delete connection
---
pkg/accesslog/common/connection.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pkg/accesslog/common/connection.go
b/pkg/accesslog/common/connection.go
index 0caf2e7..307f94e 100644
--- a/pkg/accesslog/common/connection.go
+++ b/pkg/accesslog/common/connection.go
@@ -633,7 +633,7 @@ func (c *ConnectionManager) OnBuildConnectionLogFinished() {
// already mark as deletable or process not monitoring
shouldDelete := con.MarkDeletable ||
!c.ProcessIsMonitor(con.PID)
- if con.DeleteAfter == nil {
+ if shouldDelete && con.DeleteAfter == nil {
deleteAfterTime := now.Add(connectionDeleteDelayTime)
con.DeleteAfter = &deleteAfterTime
}