Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/looper/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function addFailedRequestAssertions(assertions: ProbeAlert[]) {

export async function loopCheckSTUNServer(interval: number): Promise<unknown> {
// if stun is disabled, no need to create interval
if (interval === -1) return
if (interval === DISABLE_STUN) return

// if interval = 0 get ip once and exit. No need to setup interval.
if (interval === 0 || getContext().isTest) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/public-ip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ let publicNetworkInfo: PublicNetwork | undefined
async function pokeStun(): Promise<string> {
// for testing, bypass ping/stun server... apparently ping cannot run in github actions
// reference: https://github.com/actions/virtual-environments/issues/1519
if (getContext().isTest) {
if (getContext().isTest || getContext().flags.stun === -1) {
return '192.168.1.1' // adding for specific asserts in other tests
}

Expand Down
Loading