diff --git a/CHANGELOG.md b/CHANGELOG.md
index 72b8522..c347228 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.21.2 | 2020-02-11 | `networkConnections()` fixed linux (debian) issue |
| 4.21.1 | 2020-01-31 | `networkGatewayDefault()` fixed windows 7 issue |
| 4.21.0 | 2020-01-27 | `npx` compatibility |
| 4.20.1 | 2020-01-26 | `battery()` code refactoring, cleanup, updated docs |
diff --git a/docs/history.html b/docs/history.html
index 8eab5a7..974c0f3 100644
--- a/docs/history.html
+++ b/docs/history.html
@@ -83,6 +83,11 @@
+
+ | 4.21.2 |
+ 2020-01-31 |
+ networkConnections() fixed linux (debian) issue |
+
| 4.21.1 |
2020-01-31 |
diff --git a/docs/index.html b/docs/index.html
index f4d271d..b85b05b 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -168,7 +168,7 @@
systeminformation
- Current Version: 4.21.1
+ Current Version: 4.21.2
@@ -206,7 +206,7 @@
Downloads last month
diff --git a/lib/network.js b/lib/network.js
index 0ebc31d..c0ba7da 100644
--- a/lib/network.js
+++ b/lib/network.js
@@ -1132,8 +1132,8 @@ function networkConnections(callback) {
let cmd = 'export LC_ALL=C; netstat -tunap | grep "ESTABLISHED\\|SYN_SENT\\|SYN_RECV\\|FIN_WAIT1\\|FIN_WAIT2\\|TIME_WAIT\\|CLOSE\\|CLOSE_WAIT\\|LAST_ACK\\|LISTEN\\|CLOSING\\|UNKNOWN"; unset LC_ALL';
if (_freebsd || _openbsd || _netbsd) cmd = 'export LC_ALL=C; netstat -na | grep "ESTABLISHED\\|SYN_SENT\\|SYN_RECV\\|FIN_WAIT1\\|FIN_WAIT2\\|TIME_WAIT\\|CLOSE\\|CLOSE_WAIT\\|LAST_ACK\\|LISTEN\\|CLOSING\\|UNKNOWN"; unset LC_ALL';
exec(cmd, { maxBuffer: 1024 * 20000 }, function (error, stdout) {
- if (!error) {
- let lines = stdout.toString().split('\n');
+ let lines = stdout.toString().split('\n');
+ if (!error && (lines.length > 1 || lines[0] != '')) {
lines.forEach(function (line) {
line = line.replace(/ +/g, ' ').split(' ');
if (line.length >= 7) {