Skip to content

Commit

Permalink
More legacy code for #1885
Browse files Browse the repository at this point in the history
  • Loading branch information
jfarcand committed Mar 17, 2015
1 parent 91a9ee9 commit cf959bd
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -841,10 +841,15 @@ private void unregister() {

public void _destroy() {
try {
// TODO: Remove with Atmosphere 3
// Legacy https://github.com/Atmosphere/atmosphere/issues/1885
Broadcaster b = getBroadcaster();
if (!isCancelled.get()) {
removeFromAllBroadcasters();
}
broadcasters.clear();

broadcasters.add(b);
unregister();
removeEventListeners();
} catch (Throwable t) {
Expand Down

0 comments on commit cf959bd

Please sign in to comment.