fix(opcua): clean client on disconnect so that connect works cleanly (#9583)
This commit is contained in:
parent
dbc4e269be
commit
7def7e7328
|
|
@ -507,6 +507,7 @@ func disconnect(o *OpcUA) error {
|
||||||
case "opc.tcp":
|
case "opc.tcp":
|
||||||
o.state = Disconnected
|
o.state = Disconnected
|
||||||
o.client.Close()
|
o.client.Close()
|
||||||
|
o.client = nil
|
||||||
return nil
|
return nil
|
||||||
default:
|
default:
|
||||||
return fmt.Errorf("invalid controller")
|
return fmt.Errorf("invalid controller")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue