mirror of
https://github.com/apple/container.git
synced 2026-10-24 23:58:42 +00:00
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.
This commit is contained in:
1 parent
185b04af74
commit
7dea6dfa66
1 file changed
+8
-1
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user