pinokiod 3.15.4 → 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 +1 -0
- package/kernel/procs.js +7 -5
- package/package.json +1 -1
package/kernel/index.js
CHANGED
package/kernel/procs.js
CHANGED
|
@@ -236,23 +236,25 @@ class Procs {
|
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
async refresh() {
|
|
239
|
+
console.log("Procs.refresh")
|
|
239
240
|
let map = {}
|
|
240
|
-
if (this.refreshing) {
|
|
241
|
-
// console.log("still refreshing. retry later")
|
|
242
|
-
return
|
|
243
|
-
}
|
|
244
241
|
this.refreshing = true
|
|
245
242
|
let ts = Date.now()
|
|
246
243
|
let list = await new Promise((resolve, reject) => {
|
|
247
244
|
// console.time(">>>>>>>>GET PORTS " + ts)
|
|
245
|
+
console.log("get ports")
|
|
248
246
|
this.getPortPidList((portPidList) => {
|
|
249
|
-
console(
|
|
247
|
+
console.log("done: get ports")
|
|
248
|
+
console.log({ portPidList })
|
|
250
249
|
// console.timeEnd(">>>>>>>>GET PORTS " + ts)
|
|
251
250
|
// console.time(">>>>>>> GET PIDS " + ts)
|
|
252
251
|
// if there's any new port, run getPidToNameMap
|
|
253
252
|
|
|
254
253
|
|
|
254
|
+
console.log("getPid")
|
|
255
255
|
this.getPidToNameMap(portPidList, (pidToName) => {
|
|
256
|
+
console.log("done getPid")
|
|
257
|
+
|
|
256
258
|
// console.timeEnd(">>>>>>> GET PIDS " + ts)
|
|
257
259
|
let list = portPidList.map(({ port, pid, ip }) => {
|
|
258
260
|
const fullname = pidToName[pid] || 'Unknown';
|