Skip to content

Commit

Permalink
fix(prov-dev): Fix bug where closing provisioning device client didn'…
Browse files Browse the repository at this point in the history
…t cleanup all threads (#1741)

If the provisioning task was interrupted by the user closing the client, it needs to shutdown its executor service that runs the RegisterTask

This fix addresses #1736
  • Loading branch information
timtay-microsoft authored Sep 13, 2023
1 parent b50ae6a commit 8dcaaea
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ public Object call() throws Exception
this.executeStateMachineForStatus(registrationOperationStatusParser);
this.close();
}
catch (ExecutionException | TimeoutException | ProvisioningDeviceClientException | SecurityProviderException e)
catch (ExecutionException | TimeoutException | ProvisioningDeviceClientException | SecurityProviderException | InterruptedException e)
{
//SRS_ProvisioningTask_25_006: [ This method shall invoke the status callback, if any of the task fail or throw any exception. ]
this.dpsStatus = PROVISIONING_DEVICE_STATUS_ERROR;
Expand Down

0 comments on commit 8dcaaea

Please sign in to comment.