You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I have detected that at the beginning, if the mqtt broker is not open, the references are not managed correctly:
Reference leaks
Architecture used
Problem:
Connect to Server
Path: <vi.lib>\LabVIEW Open Source Project\MQTT Client\Client class\Connect to Server.vi
First, the connection class references are created, and then the TCP connection is opened. At this point, if the connection is failed, an error will be returned.
Path: <vi.lib>\LabVIEW Open Source Project\Connection\Connection\CreateReferences.vi
Next, the connection object is inserted into the session class, at this point in case of error it is not being registered, so the open references of the vi from point 1 are lost)
Path: <vi.lib>\LabVIEW Open Source Project\MQTT Connection\MQTT_Base\Session\Create Session.vi
Stop
Path: <vi.lib>\LabVIEW Open Source Project\MQTT Connection\MQTT_Base\Base Class\Stop.vi
Since the closing of references of the connection object is done from the session class, and in case of error in point 2 it has not been opened or registered, the references remain open.
Path: <vi.lib>\LabVIEW Open Source Project\MQTT Client\Client class\onStop.vi
Proposed Solution:
Manage the opening of references in case the connection does not return an error.
Path: <vi.lib>\LabVIEW Open Source Project\Connection\Connection\CreateReferences.vi
Close the reference in case of error creating the session.
Path: <vi.lib>\LabVIEW Open Source Project\MQTT Connection\MQTT_Base\Session\Create Session.vi
The text was updated successfully, but these errors were encountered:
Table of Contents
Evidence:
Hello, I have detected that at the beginning, if the mqtt broker is not open, the references are not managed correctly:
Problem:
Connect to Server
Path:
<vi.lib>\LabVIEW Open Source Project\MQTT Client\Client class\Connect to Server.vi
First, the connection class references are created, and then the TCP connection is opened. At this point, if the connection is failed, an error will be returned.
Path:
<vi.lib>\LabVIEW Open Source Project\Connection\Connection\CreateReferences.vi
Next, the connection object is inserted into the session class, at this point in case of error it is not being registered, so the open references of the vi from point 1 are lost)
Path:
<vi.lib>\LabVIEW Open Source Project\MQTT Connection\MQTT_Base\Session\Create Session.vi
Stop
Path:
<vi.lib>\LabVIEW Open Source Project\MQTT Connection\MQTT_Base\Base Class\Stop.vi
Path:
<vi.lib>\LabVIEW Open Source Project\MQTT Client\Client class\onStop.vi
Proposed Solution:
Manage the opening of references in case the connection does not return an error.
Path:
<vi.lib>\LabVIEW Open Source Project\Connection\Connection\CreateReferences.vi
Close the reference in case of error creating the session.
Path:
<vi.lib>\LabVIEW Open Source Project\MQTT Connection\MQTT_Base\Session\Create Session.vi
The text was updated successfully, but these errors were encountered: