Skip to content

Commit

Permalink
style(getport): add log whether "EXP_NET0LISTEN" is active or not
Browse files Browse the repository at this point in the history
  • Loading branch information
hasezoey committed Nov 16, 2023
1 parent c13cc02 commit b309a18
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/mongodb-memory-server-core/src/util/getport/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import resolveConfig, { ResolveConfigVariables, envToBool } from '../resolveConfig';
import * as net from 'node:net';
import debug from 'debug';

const log = debug('MongoMS:GetPort');

/** Linux min port that does not require root permissions */
export const MIN_PORT = 1024;
Expand Down Expand Up @@ -57,6 +60,7 @@ export async function getFreePort(
}

const exp_net0listen = envToBool(resolveConfig(ResolveConfigVariables.EXP_NET0LISTEN));
log('EXP_NET0LISTEN', exp_net0listen);

let tries = 0;
while (tries <= max_tries) {
Expand Down

0 comments on commit b309a18

Please sign in to comment.