mirror of
https://github.com/apple/container.git
synced 2026-10-17 03:29:15 +00:00
Fix the socket relay error handling and log level (#535)
- Downgrades a warning to the debug level in `BidirectionalRelay` because the shutdown syscall isn't supported for certain socket types - Rethrows an error if we can't start a socket relay
This commit is contained in:
1 parent
cb3493b507
commit
36002eed5e
3 files changed
+10
-9
No files matched your search
@@ -24,9 +24,9 @@ import Synchronization
|
||||
package final class UnixSocketRelay: Sendable {
|
||||
private let port: UInt32
|
||||
private let configuration: UnixSocketConfiguration
|
||||
private let log: Logger?
|
||||
private let vm: any VirtualMachineInstance
|
||||
private let q: DispatchQueue
|
||||
private let queue: DispatchQueue
|
||||
private let log: Logger?
|
||||
private let state: Mutex<State>
|
||||
|
||||
private struct State {
|
||||
@@ -44,10 +44,10 @@ package final class UnixSocketRelay: Sendable {
|
||||
) throws {
|
||||
self.port = port
|
||||
self.configuration = socket
|
||||
self.state = Mutex<State>(.init())
|
||||
self.vm = vm
|
||||
self.queue = queue
|
||||
self.log = log
|
||||
self.q = queue
|
||||
self.state = Mutex<State>(.init())
|
||||
}
|
||||
|
||||
deinit {
|
||||
@@ -224,7 +224,7 @@ extension UnixSocketRelay {
|
||||
let relay = BidirectionalRelay(
|
||||
fd1: hostFd,
|
||||
fd2: guestFd,
|
||||
queue: q,
|
||||
queue: queue,
|
||||
log: log
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user