Skip to content

Commit a332b49

Browse files
committed
fix(getport): update cache time when last used
re #883
1 parent b70d868 commit a332b49

File tree

1 file changed

+3
-0
lines changed
  • packages/mongodb-memory-server-core/src/util/getport

1 file changed

+3
-0
lines changed

packages/mongodb-memory-server-core/src/util/getport/index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ export async function getFreePort(
8888
continue;
8989
}
9090

91+
// reset the cache time as we now have just added new ports
92+
PORTS_CACHE.timeSet = Date.now();
93+
9194
return triedPort;
9295
}
9396
}

0 commit comments

Comments
 (0)