You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constgetPort=require('get-port');const{spawn}=require('child_process');constprocessExists=require('process-exists');constdelay=require('delay')constfkill=require('fkill');asyncfunctiontest(){constport=awaitgetPort();console.log(port);const{pid}=spawn('node',['fixture.js',port]);console.log(`Process exists with PID: ${pid}: ${awaitprocessExists(pid)}`);awaitfkill(pid);awaitdelay(100);console.log(`Process exists with PID: ${pid}: ${awaitprocessExists(pid)}`);if(!awaitprocessExists(pid)){constsamePort=awaitgetPort({port});console.log(samePort);}else{console.log('Process not killed');}}test();
Hello,
I have an issue. The code is:
./index.js
./fixture.js
With version 4.2.0 the output is as expected
With ^5.0.0, however, the second time I'm requesting the port, it comes out 1 more than before:
Has anyone here encountered this issue or knows any way to solve it?
The text was updated successfully, but these errors were encountered: