File tree Expand file tree Collapse file tree
engine/packages/depot-client/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1549,12 +1549,17 @@ fn fetch_initial_main_page(
15491549 runtime : & Handle ,
15501550 actor_id : & str ,
15511551) -> std:: result:: Result < Option < Vec < u8 > > , String > {
1552- let response = runtime. block_on ( transport. get_pages ( protocol:: SqliteGetPagesRequest {
1553- actor_id : actor_id. to_string ( ) ,
1554- pgnos : vec ! [ 1 ] ,
1555- expected_generation : None ,
1556- expected_head_txid : None ,
1557- } ) ) ;
1552+ // `register` is invoked from inside an async context (e.g. `open_database_from_envoy`),
1553+ // so plain `Handle::block_on` panics. Drop into `block_in_place` to bridge sync VFS
1554+ // registration into the async transport call.
1555+ let response = tokio:: task:: block_in_place ( || {
1556+ runtime. block_on ( transport. get_pages ( protocol:: SqliteGetPagesRequest {
1557+ actor_id : actor_id. to_string ( ) ,
1558+ pgnos : vec ! [ 1 ] ,
1559+ expected_generation : None ,
1560+ expected_head_txid : None ,
1561+ } ) )
1562+ } ) ;
15581563
15591564 match response {
15601565 Ok ( protocol:: SqliteGetPagesResponse :: SqliteGetPagesOk ( ok) ) => Ok ( ok
You can’t perform that action at this time.
0 commit comments