Skip to content

Commit a402253

Browse files
cdjacksonleonschenk
authored andcommitted
Explicitly remove transactions from queue on shutdown (#1376)
Signed-off-by: Chris Jackson <chris@cd-jackson.com>
1 parent c971ada commit a402253

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/transaction/ZigBeeTransactionQueue.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,11 @@ protected void shutdown() {
132132
isShutdown = true;
133133

134134
// Cancel any queued transactions
135-
for (ZigBeeTransaction transaction : queue) {
135+
while (!queue.isEmpty()) {
136+
ZigBeeTransaction transaction = queue.poll();
137+
if (transaction == null) {
138+
break;
139+
}
136140
transaction.cancel();
137141
}
138142

0 commit comments

Comments
 (0)