Skip to content

Commit

Permalink
fix(inputs.opcua): Reconnect if closed connection (#15696)
Browse files Browse the repository at this point in the history
(cherry picked from commit b090cf6)
  • Loading branch information
powersj committed Aug 12, 2024
1 parent fe58ecc commit 7e24638
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/inputs/opcua/read_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7e24638

Please sign in to comment.