@rip-lang/server 0.5.4 → 0.5.6
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/package.json +1 -1
- package/server.rip +10 -1
package/package.json
CHANGED
package/server.rip
CHANGED
|
@@ -523,7 +523,16 @@ class Manager
|
|
|
523
523
|
tracked
|
|
524
524
|
|
|
525
525
|
monitor: (w) ->
|
|
526
|
-
w.process.exited
|
|
526
|
+
await w.process.exited # Wait for process to exit
|
|
527
|
+
|
|
528
|
+
# Notify server to remove dead worker's socket entry
|
|
529
|
+
try
|
|
530
|
+
ctl = getControlSocketPath(@flags.socketPrefix)
|
|
531
|
+
body = JSON.stringify({ op: 'quit', workerId: w.id })
|
|
532
|
+
await fetch('http://localhost/worker', { method: 'POST', body, headers: { 'content-type': 'application/json' }, unix: ctl })
|
|
533
|
+
catch
|
|
534
|
+
null
|
|
535
|
+
|
|
527
536
|
return if @shuttingDown
|
|
528
537
|
return if @retiringIds.has(w.id)
|
|
529
538
|
w.restartCount++
|