I rolled back to version 1 because it takes too much time to kill a process compared to version 1
It also throws an error if port is not found.
I think it's better to keep the existing logic to kill a port
lsof -i ${method === 'udp' ? 'udp' : 'tcp'}:${port} instead of using lsof -i -P, which takes too much time
IMO kill() must resolve when
- when a port is found and kill
- when a port is not found and nothing to kill
I rolled back to version 1 because it takes too much time to kill a process compared to version 1
It also throws an error if port is not found.
I think it's better to keep the existing logic to kill a port
lsof -i ${method === 'udp' ? 'udp' : 'tcp'}:${port}instead of usinglsof -i -P, which takes too much timeIMO
kill()must resolve when