Skip to content

Commit 3d18823

Browse files
hirofumiminbi
authored andcommitted
Prevent HandlerThread leak of AWSIotMqttManager
Otherwise leak occurs on reconnection as follows. https://github.com/hirofumi/aws-sdk-android-ht-leak
1 parent dd64350 commit 3d18823

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

aws-android-sdk-iot/src/main/java/com/amazonaws/mobileconnectors/iot/AWSIotMqttManager.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,6 +1053,7 @@ public void run() {
10531053
if (mqttClient != null && !mqttClient.isConnected()) {
10541054
reconnectToSession();
10551055
}
1056+
ht.quit();
10561057
}
10571058
}, MILLIS_IN_ONE_SECOND * currentReconnectRetryTime);
10581059
currentReconnectRetryTime = Math.min(currentReconnectRetryTime * 2, maxReconnectRetryTime);

0 commit comments

Comments
 (0)