fix clearTimeout

This commit is contained in:
xzper 2016-08-10 18:23:24 +08:00 committed by GitHub
parent 666ed83a2d
commit 1503e3367c

View file

@ -25,7 +25,7 @@ export function findFreePort(startPort: number, giveUpAfter: number, timeout: nu
doFindFreePort(startPort, giveUpAfter, (port) => {
if (!done) {
done = true;
window.clearTimeout(timeoutHandle);
clearTimeout(timeoutHandle);
return clb(port);
}
@ -71,4 +71,4 @@ function dispose(socket: net.Socket): void {
} catch (error) {
console.error(error); // otherwise this error would get lost in the callback chain
}
}
}