Closed michielbdejong closed 7 years ago
Correction, the process hangs for one minute, then exits (I guess the 3 seconds is the time it takes to connect, then disconnect takes 60 seconds?):
time node test.js
connected!
disconnected, expecting process to exit now...
real 1m3.093s
user 0m0.603s
sys 0m0.059s
confirmed that it's fixed in that branch.
Save this as test.js:
Now run (the --expose-internals is needed because of https://github.com/mafintosh/why-is-node-running/issues/7):
You will see the process hangs after the 'disconnected, expecting process to exit now...' statement. Unfortunately, if you uncomment the first line, the process crashes with an error in net.js, so I haven't been able yet to acually use why-is-node-running to find out why node is running..
@sentientwaffle any idea why the node process keeps running even after you call
plugin.disconnect()
? Seems to me it's probably related to the whole WebSocket reconnect logic, which is now properly complex in https://github.com/interledgerjs/ilp-plugin-bells/blob/master/src/lib/plugin.js#L211-L330