pinokiod 3.15.3 → 3.15.5

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 CHANGED
@@ -285,12 +285,16 @@ 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 })
297
+ console.log({ refreshing: this.processes.refreshing })
294
298
  if (network_running) {
295
299
 
296
300
 
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 });
@@ -232,22 +236,25 @@ class Procs {
232
236
  }
233
237
  }
234
238
  async refresh() {
239
+ console.log("Procs.refresh")
235
240
  let map = {}
236
- if (this.refreshing) {
237
- // console.log("still refreshing. retry later")
238
- return
239
- }
240
241
  this.refreshing = true
241
242
  let ts = Date.now()
242
243
  let list = await new Promise((resolve, reject) => {
243
244
  // console.time(">>>>>>>>GET PORTS " + ts)
245
+ console.log("get ports")
244
246
  this.getPortPidList((portPidList) => {
247
+ console.log("done: get ports")
248
+ console.log({ portPidList })
245
249
  // console.timeEnd(">>>>>>>>GET PORTS " + ts)
246
250
  // console.time(">>>>>>> GET PIDS " + ts)
247
251
  // if there's any new port, run getPidToNameMap
248
252
 
249
253
 
254
+ console.log("getPid")
250
255
  this.getPidToNameMap(portPidList, (pidToName) => {
256
+ console.log("done getPid")
257
+
251
258
  // console.timeEnd(">>>>>>> GET PIDS " + ts)
252
259
  let list = portPidList.map(({ port, pid, ip }) => {
253
260
  const fullname = pidToName[pid] || 'Unknown';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.15.3",
3
+ "version": "3.15.5",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {