Skip to content

Commit

Permalink
fix: variable scope
Browse files Browse the repository at this point in the history
  • Loading branch information
fredriklindberg committed Aug 31, 2023
1 parent 6d482d2 commit 0c7c1a4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/tunnel/tunnel-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,7 @@ class TunnelService {
return connection.transport.createConnection(ctx.opts, callback);
}

let prev;
do {
const node = this._clusterService.getNode(next.node);
if (node && !next.local) {
Expand All @@ -690,9 +691,9 @@ class TunnelService {
port: ctx.ingress.port,
}, callback);
}
const prev = next;
prev = next;
next = this._tunnels.getNextConnection(tunnelId);
} while (next != undefined && next.id != prev.id);
} while (next != undefined && next.id != prev?.id);

return false;
}
Expand Down

0 comments on commit 0c7c1a4

Please sign in to comment.