fix(core): update

This commit is contained in:
Philipp Kunz 2021-04-13 10:09:39 +00:00
parent ec4121cbcf
commit 49940635d5
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ tap.test('should create a valid instance of SmartNetwork', async () => {
});
tap.test('should perform a speedtest', async () => {
let result = await testSmartNetwork.getSpeed();
const result = await testSmartNetwork.getSpeed();
console.log(`Download speed for this instance is ${result.speeds.download}`);
console.log(`Upload speed for this instance is ${result.speeds.upload}`);
});

View File

@ -57,7 +57,7 @@ export class SmartNetwork {
* note: false also resolves with false as argument
* @param port
*/
public async isLocalPortAvailable(port: number): Promise<boolean> {
public async isLocalPortUnused(port: number): Promise<boolean> {
const doneIpV4 = plugins.smartpromise.defer<boolean>();
const doneIpV6 = plugins.smartpromise.defer<boolean>();
const net = await import('net'); // creates only one instance of net ;) even on multiple calls