fix: Do not return on disconnect to avoid breaking reconnect (#9524)
This commit is contained in:
parent
16597586f5
commit
249bcd25d5
|
|
@ -407,7 +407,9 @@ func Connect(o *OpcUA) error {
|
|||
|
||||
if o.client != nil {
|
||||
if err := o.client.CloseSession(); err != nil {
|
||||
return err
|
||||
// Only log the error but to not bail-out here as this prevents
|
||||
// reconnections for multiple parties (see e.g. #9523).
|
||||
o.Log.Errorf("Closing session failed: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import (
|
|||
|
||||
"github.com/influxdata/telegraf/config"
|
||||
"github.com/influxdata/telegraf/testutil"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
|
@ -44,7 +45,6 @@ func TestClient1Integration(t *testing.T) {
|
|||
o.SecurityPolicy = "None"
|
||||
o.SecurityMode = "None"
|
||||
o.Log = testutil.Logger{}
|
||||
|
||||
for _, tags := range testopctags {
|
||||
o.RootNodes = append(o.RootNodes, MapOPCTag(tags))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue