Skip to content

Commit 3400fd4

Browse files
authored
Fix problem with multiple deletes in test (#85)
1 parent e580c8d commit 3400fd4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compute/startup-script/index.js

+3-1
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)