networkConnections() pid fix NAN

This commit is contained in:
Sebastian Hildebrandt
2019-07-07 10:33:47 +02:00
parent f380bf5fb2
commit 58f376d40d
4 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -814,7 +814,7 @@ function networkConnections(callback) {
peeraddress: peerip,
peerport: peerport,
state: connstate,
pid: proc[0] ? parseInt(proc[0], 10) : -1,
pid: proc[0] && proc[0] !== '-' ? parseInt(proc[0], 10) : -1,
process: proc[1] ? proc[1].split(' ')[0] : ''
});
}