-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Description
If you call ImageProxy::get_descriptor() and try to call .read_to_end() on the returned impl AsyncBufRead then you'll stall forever.
let (mut blob_reader, driver) = self.proxy.get_descriptor(&self.img, &descriptor).await?;
blob_reader.read_to_end(&mut raw_config).await?; // <- gets stuck here
driver.await?;Looking at the example code in the repository, you can see that something like this works, however:
let (mut blob_reader, driver) = self.proxy.get_descriptor(&self.img, &descriptor).await?;
let mut raw_config = vec![];
let (a, b) = tokio::join!(blob_reader.read_to_end(&mut raw_config), driver);
a?;
b?;It would be cool if either:
- the 'naive' approach worked; or
- what you need to do with the return values got documented as part of the function docs
Metadata
Metadata
Assignees
Labels
No labels