Skip to content

Commit 7dea6df

Browse files
authored
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.
1 parent 185b04a commit 7dea6df

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

Sources/ContainerizationOS/Socket/BidirectionalRelay.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,14 @@ public final class BidirectionalRelay: Sendable {
211211
to: destinationFd
212212
)
213213
} catch {
214-
log?.error("file descriptor copy failed \(error)")
214+
log?.warning(
215+
"file descriptor copy failed",
216+
metadata: [
217+
"error": "\(error)",
218+
"sourceFd": "\(sourceFd)",
219+
"destinationFd": "\(destinationFd)",
220+
]
221+
)
215222
if !source.isCancelled {
216223
source.cancel()
217224
if shutdown(destinationFd, Int32(SHUT_RDWR)) != 0 {

0 commit comments

Comments
 (0)