Gosec failure fixes and ci checks ajdustment
Change-Id: I430c3118b585ba924649ed32e8196e0e7e0bc260
diff --git a/internal/pkg/openflow/connection.go b/internal/pkg/openflow/connection.go
index 87a50b3..b9c1c71 100644
--- a/internal/pkg/openflow/connection.go
+++ b/internal/pkg/openflow/connection.go
@@ -72,7 +72,10 @@
if ofc.conn != nil {
logger.Debugw(ctx, "closing-of-connection-to-reconnect",
log.Fields{"device-id": ofc.DeviceID})
- ofc.conn.Close()
+ err := ofc.conn.Close()
+ if err != nil {
+ logger.Errorw(ctx, "failed-connection-close-proceeding-setting-to-nil", log.Fields{"error": err})
+ }
ofc.conn = nil
}
try := 1
@@ -216,7 +219,10 @@
if ofc.conn != nil {
logger.Debugw(ctx, "closing-of-connection",
log.Fields{"device-id": ofc.DeviceID})
- ofc.conn.Close()
+ err := ofc.conn.Close()
+ if err != nil {
+ logger.Errorw(ctx, "closing-of-connection", log.Fields{"error": err})
+ }
ofc.conn = nil
}
logger.Debugw(ctx, "state-machine-finished",