mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-10 00:35:25 +03:00
a1da025b78
* Test case for LockedFreePort not colliding with port 0 changelog_begin changelog_end * Discover dynamic port range on Linux * Random port generator outside ephemeral range * remove dev comments * Draw FreePort from outside the ephemeral port range Note, there is a race condition between the socket being closed and the lock-file being created in LockedFreePort. This is not a new issue, it was already present with the previous port 0 based implementation. LockedFreePort handles this by attempting to find a free port and taking a file lock multiple times. But, it could happen that A `find`s port N, and obtains the lock, but doesn't bind port N again, yet; then B binds port N during `find`; then A attempts to bind port N before B could release it again and fails because B still holds it. * Select dynamic port range based on OS * Detect dynamic port range on MacOS and Windows * Import sysctl from Nix on MacOS changelog_begin changelog_end * Windows line separator * FreePort helpers visibility * Use more informative exception types * Use a more light weight unit test * Add comments * Fix Windows * Update libs-scala/ports/src/main/scala/com/digitalasset/ports/FreePort.scala Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com> * Update libs-scala/ports/src/main/scala/com/digitalasset/ports/FreePort.scala Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com> * Add a comment to clarify the generated port range * fmt * unused import * Split libs-scala/ports Splits the FreePort and LockedFreePort components into a separate library as this is only used for testing purposes. Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io> Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com> |
||
---|---|---|
.. | ||
certs | ||
nixpkgs | ||
overrides | ||
tools | ||
bazel-cc-toolchain.nix | ||
bazel-cc-wrapper-response-file.patch | ||
bazel-retry-cache.patch | ||
bazel.nix | ||
BUILD.bazel | ||
default.nix | ||
nixpkgs.nix |