Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Don't remove our authentication cookies on an upgrade or downgrade of…
Browse files Browse the repository at this point in the history
… the add-on, only on uninstall/disable
  • Loading branch information
ianb committed Oct 5, 2016
1 parent 105d442 commit cf091c5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions addon/lib/main.js
Expand Up @@ -177,9 +177,11 @@ exports.onUnload = function (reason) {
deviceInfo: JSON.stringify(deviceInfo)
}
});
// We can't rely on the server removing cookies, because the request may not
// complete locally, since the addon is being destroyed
removeCookies();
if (reason == "disable" || reason == "uninstall") {
// We can't rely on the server removing cookies, because the request may not
// complete locally, since the addon is being destroyed
removeCookies();
}
};

/** Remove the user and user.sig cookies for the backend */
Expand Down

0 comments on commit cf091c5

Please sign in to comment.