async function getFreePort(port) {
	let attempts = 0;

	if (typeof port === 'string') port = parseInt(port, 10);

	// Limit to 20 attempts for now
	while (attempts <= 20) {
		if (await isPortFree(port)) break;

		port++;
		attempts++;
	}

	return port;
}
Check if the requested port is free and increase port number
sequentially until we find a free port.
@param {number|string} port The suggested port to listen on
@returns {Promise<number>} The next free port