From f176056976674429831cc87fe17cdf3e5b45d005 Mon Sep 17 00:00:00 2001 From: Aviram Hassan Date: Wed, 28 Jun 2023 11:10:48 +0300 Subject: [PATCH] fixed eaddrinuse reported as error (#1589) * fixed eaddrinuse reported as error * fix array --- changelog.d/+eaddrinuse_not_error.fixed.md | 1 + mirrord/layer/src/error.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/+eaddrinuse_not_error.fixed.md diff --git a/changelog.d/+eaddrinuse_not_error.fixed.md b/changelog.d/+eaddrinuse_not_error.fixed.md new file mode 100644 index 00000000000..0618f22ab6d --- /dev/null +++ b/changelog.d/+eaddrinuse_not_error.fixed.md @@ -0,0 +1 @@ +Fixed reporting EADDRINUSE as an error \ No newline at end of file diff --git a/mirrord/layer/src/error.rs b/mirrord/layer/src/error.rs index 79d96925a06..e52d6b99767 100644 --- a/mirrord/layer/src/error.rs +++ b/mirrord/layer/src/error.rs @@ -21,7 +21,7 @@ mod ignore_codes { /// Error codes from [`libc`] that are **not** hard errors, meaning the operation may progress. /// /// Prefer using [`is_ignored_code`] instead of relying on this constant. - const IGNORE_ERROR_CODES: [i32; 2] = [libc::EINPROGRESS, libc::EAFNOSUPPORT]; + const IGNORE_ERROR_CODES: [i32; 3] = [libc::EINPROGRESS, libc::EAFNOSUPPORT, libc::EADDRINUSE]; /// Checks if an error code from some [`libc`] function should be treated as a hard error, or /// not.