Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ const Indicator = GObject.registerClass(
this._pingStatus = new Map();
this._previousCategory = null;
this._connected = false;
this._destroyed = false;

const iconPath = GLib.build_filenamev([
extensionPath,
Expand Down Expand Up @@ -235,8 +234,6 @@ const Indicator = GObject.registerClass(
return;
}

if (this._destroyed) return;

const name = parseNetworkName(result.stdout);
if (name) this._networkNameLabel.text = name;
}
Expand Down Expand Up @@ -281,7 +278,6 @@ const Indicator = GObject.registerClass(
if (generation !== this._resourceGeneration) return;
pingAddress(address, this._cancellable)
.then((reachable) => {
if (this._destroyed) return;
if (generation !== this._resourceGeneration) return;
this._pingStatus.set(address, reachable);
const dot = this._resourceDots.get(address);
Expand Down Expand Up @@ -532,7 +528,6 @@ const Indicator = GObject.registerClass(
} finally {
this._busy = false;
}
if (this._destroyed) return;
this._scheduleQuickRefreshes();
}

Expand All @@ -549,7 +544,6 @@ const Indicator = GObject.registerClass(
} finally {
this._busy = false;
}
if (this._destroyed) return;
this._scheduleQuickRefreshes();
}

Expand Down Expand Up @@ -577,14 +571,11 @@ const Indicator = GObject.registerClass(
);
} catch (e) {
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) return;
if (this._destroyed) return;
this._setState("unknown");
this._maybeNotifyStateChange("unknown");
return;
}

if (this._destroyed) return;

if (!result.success && result.stdout.length === 0) {
this._setState("unknown");
this._maybeNotifyStateChange("unknown");
Expand Down Expand Up @@ -630,19 +621,14 @@ const Indicator = GObject.registerClass(
);
} catch (e) {
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) return;
if (this._destroyed) return;
this._setResources([]);
return;
}

if (this._destroyed) return;

this._setResources(parseResources(result.stdout));
}

destroy() {
this._destroyed = true;

if (this._timeoutId) {
GLib.Source.remove(this._timeoutId);
this._timeoutId = null;
Expand Down
Loading