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

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 committed Sep 12, 2023
1 parent b50ae6a commit ed617cb
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 ed617cb

Please sign in to comment.