diff --git a/plugins/inputs/opcua/read_client.go b/plugins/inputs/opcua/read_client.go index b6f2a0d5a2b61..b765ff72d1c13 100644 --- a/plugins/inputs/opcua/read_client.go +++ b/plugins/inputs/opcua/read_client.go @@ -91,7 +91,7 @@ func (o *ReadClient) Connect() error { } func (o *ReadClient) ensureConnected() error { - if o.State() == opcua.Disconnected { + if o.State() == opcua.Disconnected || o.State() == opcua.Closed { return o.Connect() } return nil