Skip to content

Commit

Permalink
fix(getport): update cache time when last used
Browse files Browse the repository at this point in the history
re #883
  • Loading branch information
hasezoey committed Aug 3, 2024
1 parent b70d868 commit a332b49
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/mongodb-memory-server-core/src/util/getport/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ export async function getFreePort(
continue;
}

// reset the cache time as we now have just added new ports
PORTS_CACHE.timeSet = Date.now();

return triedPort;
}
}
Expand Down

0 comments on commit a332b49

Please sign in to comment.