1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-23 22:36:32 +02:00

Tools: Fixed Android build

This commit is contained in:
Laurent Cozic
2021-11-21 16:38:56 +00:00
parent c972da1b15
commit bffd181f51
3 changed files with 3 additions and 5 deletions

View File

@@ -10,9 +10,7 @@ export async function ip() {
return ip.ip;
}
export async function findAvailablePort(possiblePorts: number[], extraRandomPortsToTry = 20) {
const tcpPortUsed = require('tcp-port-used');
export async function findAvailablePort(tcpPortUsed: any, possiblePorts: number[], extraRandomPortsToTry = 20) {
for (let i = 0; i < extraRandomPortsToTry; i++) {
possiblePorts.push(Math.floor(8000 + Math.random() * 2000));
}