mirror of
https://github.com/apple/container.git
synced 2026-10-25 16:18:57 +00:00
VsockConnectionStream: Conform to AsyncSequence (#380)
I didn't like how we expose the asyncstream via a public connections field. We should have the type conform to AsyncSequence and then hide the underlying stream. This also stops listening on the stdio ports after we get the initial connection.
This commit is contained in:
1 parent
8b39713a00
commit
bec1008f4d
3 files changed
+24
-7
No files matched your search
@@ -201,7 +201,7 @@ extension SocketRelay {
|
||||
$0.t = Task {
|
||||
do {
|
||||
defer { connectionStream.finish() }
|
||||
for await connection in connectionStream.connections {
|
||||
for await connection in connectionStream {
|
||||
try await self.handleGuestVsockConn(
|
||||
vsockConn: connection,
|
||||
hostConnectionPath: hostPath,
|
||||
|
||||
Reference in new issue
Block a user