From 6e60c1d2e880c4dc531129b6ea10c43cc1fc7f66 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Fri, 16 Oct 2020 10:29:26 +0200 Subject: [PATCH] dockerContainers() resolved hanging issue --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 4 ++-- lib/docker.js | 3 +++ lib/network.js | 4 ++-- 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 019a956..0e95ea8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page. | Version | Date | Comment | | -------------- | -------------- | -------- | +| 4.27.10 | 2020-10-16 | `dockerContainers()` resolved hanging issue | | 4.27.9 | 2020-10-13 | `networkInterfaces()` loopback internal detection (windows) | | 4.27.8 | 2020-10-08 | windows codepages partial fix | | 4.27.7 | 2020-10-05 | updated typescript typings, minor fixes | diff --git a/docs/history.html b/docs/history.html index 1e7f50c..05c9067 100644 --- a/docs/history.html +++ b/docs/history.html @@ -83,6 +83,11 @@ + + 4.27.10 + 2020-10-16 + dockerContainers() resolved hanging issue + 4.27.9 2020-10-13 diff --git a/docs/index.html b/docs/index.html index 510895e..1a843ac 100644 --- a/docs/index.html +++ b/docs/index.html @@ -168,7 +168,7 @@
systeminformation
-
Current Version: 4.27.9
+
Current Version: 4.27.10
@@ -207,7 +207,7 @@
Downloads last month
-
352
+
356
Dependends
diff --git a/lib/docker.js b/lib/docker.js index 22d69a3..271507b 100644 --- a/lib/docker.js +++ b/lib/docker.js @@ -162,6 +162,9 @@ function dockerContainers(all, callback) { if (callback) { callback(result); } resolve(result); } + } else { + if (callback) { callback(result); } + resolve(result); } } catch (err) { // GC in _docker_container_stats diff --git a/lib/network.js b/lib/network.js index e4dea69..e134ecd 100644 --- a/lib/network.js +++ b/lib/network.js @@ -745,7 +745,8 @@ function networkInterfaces(callback, rescan = true) { _ifaces = Object.assign({}, ifaces); if (_windows) { - getWindowsNics().forEach(nic => { + nics = getWindowsNics(); + nics.forEach(nic => { let found = false; Object.keys(ifaces).forEach(key => { if (!found) { @@ -763,7 +764,6 @@ function networkInterfaces(callback, rescan = true) { }); nics8021xInfo = getWindowsWiredProfilesInformation(); - nics = getWindowsNics(); dnsSuffixes = getWindowsDNSsuffixes(); } if (_linux) {