Skip to content

Commit

Permalink
fix(iot-dev): Fix SDK leaking apache qpid objects after unregistering…
Browse files Browse the repository at this point in the history
… a device (#1501)

#1478

The reactor instance still held onto the last scheduled SAS token renewal task for an unregistered device when it needed to be cancelled, and the sessions and links needed to be free'd after they were closed.
  • Loading branch information
timtay-microsoft authored Mar 23, 2022
1 parent 0dd8b24 commit 801f3c8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -321,5 +321,7 @@ private void clearHandlers()
childrenIterator.next();
childrenIterator.remove();
}

this.receiverLink.free();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ private void clearHandlers()
{
if (this.scheduledTask != null)
{
this.scheduledTask.cancel();
this.scheduledTask.attachments().clear();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,5 +335,7 @@ private void clearHandlers()
childrenIterator.next();
childrenIterator.remove();
}

this.senderLink.free();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -569,5 +569,7 @@ private void clearHandlers()
childrenIterator.next();
childrenIterator.remove();
}

this.session.free();
}
}

0 comments on commit 801f3c8

Please sign in to comment.