From 7dea6dfa66678a7be4b51083c0ffde40b2e63604 Mon Sep 17 00:00:00 2001 From: Dmitry Kovba Date: Thu, 19 Feb 2026 19:43:37 -0800 Subject: [PATCH] Downgrade a relay error to a warning (#545) - This PR downgrades a relay error that might be logged when a connection is closed to a warning. - Related PR in apple/container#1238. --- .../ContainerizationOS/Socket/BidirectionalRelay.swift | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Sources/ContainerizationOS/Socket/BidirectionalRelay.swift b/Sources/ContainerizationOS/Socket/BidirectionalRelay.swift index 52d5d6ee..728a9937 100644 --- a/Sources/ContainerizationOS/Socket/BidirectionalRelay.swift +++ b/Sources/ContainerizationOS/Socket/BidirectionalRelay.swift @@ -211,7 +211,14 @@ public final class BidirectionalRelay: Sendable { to: destinationFd ) } catch { - log?.error("file descriptor copy failed \(error)") + log?.warning( + "file descriptor copy failed", + metadata: [ + "error": "\(error)", + "sourceFd": "\(sourceFd)", + "destinationFd": "\(destinationFd)", + ] + ) if !source.isCancelled { source.cancel() if shutdown(destinationFd, Int32(SHUT_RDWR)) != 0 {