Skip to content

Commit bffc92f

Browse files
fhinkelAce Nassri
authored andcommitted
Fix problem with multiple deletes in test (#85)
1 parent da52371 commit bffc92f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compute/startup-script/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,14 @@ function createVm(name, callback) {
6666
console.log('Booting new VM with IP http://' + ip + '...');
6767

6868
// Ping the VM to determine when the HTTP server is ready.
69+
let waiting = true;
6970
const timer = setInterval(
7071
ip => {
7172
http
7273
.get('http://' + ip, res => {
7374
const statusCode = res.statusCode;
74-
if (statusCode === 200) {
75+
if (statusCode === 200 && waiting) {
76+
waiting = false;
7577
clearTimeout(timer);
7678
// HTTP server is ready.
7779
console.log('Ready!');

0 commit comments

Comments
 (0)