pinokiod 3.15.3 → 3.15.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/kernel/index.js +3 -0
- package/kernel/procs.js +5 -0
- package/package.json +1 -1
package/kernel/index.js
CHANGED
|
@@ -285,12 +285,15 @@ class Kernel {
|
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
async refresh(notify_peers) {
|
|
288
|
+
console.log("kernel.refresh")
|
|
288
289
|
const ts = Date.now()
|
|
289
290
|
let network_active = await this.network_active()
|
|
291
|
+
console.log({ network_active })
|
|
290
292
|
if (!network_active) {
|
|
291
293
|
return
|
|
292
294
|
}
|
|
293
295
|
let network_running = await this.network_running()
|
|
296
|
+
console.log({ network_running })
|
|
294
297
|
if (network_running) {
|
|
295
298
|
|
|
296
299
|
|
package/kernel/procs.js
CHANGED
|
@@ -43,6 +43,7 @@ class Procs {
|
|
|
43
43
|
let s = stdout.trim()
|
|
44
44
|
const lines = s.split('\n');
|
|
45
45
|
for(let line of lines) {
|
|
46
|
+
console.log({ line })
|
|
46
47
|
if (isWin) {
|
|
47
48
|
// Skip headers
|
|
48
49
|
try {
|
|
@@ -67,9 +68,12 @@ class Procs {
|
|
|
67
68
|
ip = localAddress
|
|
68
69
|
}
|
|
69
70
|
|
|
71
|
+
console.log("isHttp?", ip)
|
|
70
72
|
let isHttp = await this.isHttp(ip)
|
|
73
|
+
console.log(isHttp)
|
|
71
74
|
if (!isHttp) continue
|
|
72
75
|
|
|
76
|
+
|
|
73
77
|
if (pids.has(pid+"/"+port)) continue;
|
|
74
78
|
pids.add(pid+"/"+port)
|
|
75
79
|
results.push({ port, pid, ip });
|
|
@@ -242,6 +246,7 @@ class Procs {
|
|
|
242
246
|
let list = await new Promise((resolve, reject) => {
|
|
243
247
|
// console.time(">>>>>>>>GET PORTS " + ts)
|
|
244
248
|
this.getPortPidList((portPidList) => {
|
|
249
|
+
console({ portPidList })
|
|
245
250
|
// console.timeEnd(">>>>>>>>GET PORTS " + ts)
|
|
246
251
|
// console.time(">>>>>>> GET PIDS " + ts)
|
|
247
252
|
// if there's any new port, run getPidToNameMap
|