Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(prov-dev): Fix small logic error around multiple open calls in MQTT layer #1775

Merged
merged 2 commits into from
Jan 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ private void processRetryAfterValue(String mqttTopic)
@Override
public synchronized void open(RequestData requestData) throws ProvisioningDeviceConnectionException
{
if (this.mqttConnection != null && !this.mqttConnection.isMqttConnected())
if (this.mqttConnection != null && this.mqttConnection.isMqttConnected())
{
throw new ProvisioningDeviceConnectionException("Open called on an already open connection");
}
Expand Down Expand Up @@ -203,7 +203,7 @@ public synchronized void close() throws ProvisioningDeviceConnectionException
{
try
{
if (this.mqttConnection != null && this.mqttConnection.isMqttConnected() )
if (this.mqttConnection != null && this.mqttConnection.isMqttConnected())
{
this.mqttConnection.disconnect();
}
Expand Down