From cf091c5a1c2084231228525a0bd1860fdfe95835 Mon Sep 17 00:00:00 2001 From: Ian Bicking Date: Wed, 5 Oct 2016 13:12:30 -0500 Subject: [PATCH] Don't remove our authentication cookies on an upgrade or downgrade of the add-on, only on uninstall/disable --- addon/lib/main.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/addon/lib/main.js b/addon/lib/main.js index ae97734cf9..70dc8d82a1 100644 --- a/addon/lib/main.js +++ b/addon/lib/main.js @@ -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 */