File tree Expand file tree Collapse file tree 1 file changed +28
-3
lines changed Expand file tree Collapse file tree 1 file changed +28
-3
lines changed Original file line number Diff line number Diff line change @@ -612,29 +612,54 @@ struct SandboxCache {
612
612
impl SandboxCache {
613
613
async fn crates ( & self ) -> Result < Stamped < MetaCratesResponse > > {
614
614
let coordinator = Coordinator :: new_docker ( ) . await ;
615
- self . crates
615
+
616
+ let c = self
617
+ . crates
616
618
. fetch ( || async { Ok ( coordinator. crates ( ) . await . context ( CratesSnafu ) ?. into ( ) ) } )
619
+ . await ;
620
+
621
+ coordinator
622
+ . shutdown ( )
617
623
. await
624
+ . context ( ShutdownCoordinatorSnafu ) ?;
625
+
626
+ c
618
627
}
619
628
620
629
async fn versions ( & self ) -> Result < Stamped < MetaVersionsResponse > > {
621
630
let coordinator = Coordinator :: new_docker ( ) . await ;
622
631
623
- self . versions
632
+ let v = self
633
+ . versions
624
634
. fetch ( || async { Ok ( coordinator. versions ( ) . await . context ( VersionsSnafu ) ?. into ( ) ) } )
635
+ . await ;
636
+
637
+ coordinator
638
+ . shutdown ( )
625
639
. await
640
+ . context ( ShutdownCoordinatorSnafu ) ?;
641
+
642
+ v
626
643
}
627
644
628
645
async fn raw_versions ( & self ) -> Result < Stamped < Arc < Versions > > > {
629
646
let coordinator = Coordinator :: new_docker ( ) . await ;
630
647
631
- self . raw_versions
648
+ let rv = self
649
+ . raw_versions
632
650
. fetch ( || async {
633
651
Ok ( Arc :: new (
634
652
coordinator. versions ( ) . await . context ( VersionsSnafu ) ?,
635
653
) )
636
654
} )
655
+ . await ;
656
+
657
+ coordinator
658
+ . shutdown ( )
637
659
. await
660
+ . context ( ShutdownCoordinatorSnafu ) ?;
661
+
662
+ rv
638
663
}
639
664
640
665
async fn version_stable ( & self ) -> Result < Stamped < MetaVersionResponse > > {
You can’t perform that action at this time.
0 commit comments