@@ -244,9 +244,9 @@ func (c *ConnectionManager) Find(event events.Event) *ConnectionInfo {
244
244
c .connections .Set (connectionKey , connection )
245
245
if log .Enable (logrus .DebugLevel ) {
246
246
log .Debugf ("building flushing connection, connection ID: %d, randomID: %d, role: %s, local: %s:%d, remote: %s:%d, " +
247
- "local address: %s, remote address: %s" ,
247
+ "local address: %s, remote address: %s, protocol: %s " ,
248
248
e .GetConnectionID (), e .GetRandomID (), socket .Role , socket .SrcIP , socket .SrcPort , socket .DestIP , socket .DestPort ,
249
- localAddress .String (), remoteAddress .String ())
249
+ localAddress .String (), remoteAddress .String (), connection . RPCConnection . Protocol . String () )
250
250
}
251
251
c .connectionPostHandle (connection , event )
252
252
return connection
@@ -620,6 +620,18 @@ func (c *ConnectionManager) OnBuildConnectionLogFinished() {
620
620
}
621
621
622
622
func (c * ConnectionManager ) SkipAllDataAnalyzeAndDowngradeProtocol (conID , ranID uint64 ) {
623
+ // setting connection protocol is break
624
+ connectionKey := fmt .Sprintf ("%d_%d" , conID , ranID )
625
+ data , exist := c .connections .Get (connectionKey )
626
+ if exist {
627
+ connection := data .(* ConnectionInfo )
628
+ connection .ProtocolBreak = true
629
+ } else {
630
+ // setting to the protocol break map for encase the runner not starting building logs
631
+ c .connectionProtocolBreakMap .Set (connectionKey , true , time .Minute )
632
+ }
633
+
634
+ // setting the connection skip data upload
623
635
var activateConn ActiveConnection
624
636
if err := c .activeConnectionMap .Lookup (conID , & activateConn ); err != nil {
625
637
if errors .Is (err , ebpf .ErrKeyNotExist ) {
@@ -637,16 +649,6 @@ func (c *ConnectionManager) SkipAllDataAnalyzeAndDowngradeProtocol(conID, ranID
637
649
if err := c .activeConnectionMap .Update (conID , activateConn , ebpf .UpdateAny ); err != nil {
638
650
log .Warnf ("failed to update the active connection: %d-%d" , conID , ranID )
639
651
}
640
-
641
- connectionKey := fmt .Sprintf ("%d_%d" , conID , ranID )
642
- data , exist := c .connections .Get (connectionKey )
643
- if exist {
644
- connection := data .(* ConnectionInfo )
645
- connection .ProtocolBreak = true
646
- } else {
647
- // setting to the protocol break map for encase the runner not starting building logs
648
- c .connectionProtocolBreakMap .Set (connectionKey , true , time .Minute )
649
- }
650
652
}
651
653
652
654
func getSocketPairFromConnectEvent (event events.Event ) (* events.SocketConnectEvent , * ip.SocketPair ) {
0 commit comments