Skip to content

Commit

Permalink
Merge #2216
Browse files Browse the repository at this point in the history
2216: Fix server server panic r=Deniallugo a=Deniallugo

Signed-off-by: deniallugo <[email protected]>

Co-authored-by: deniallugo <[email protected]>
  • Loading branch information
bors-matterlabs-dev[bot] and Deniallugo authored Mar 25, 2022
2 parents 6bab9fa + c629aa8 commit e024ca8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions core/bin/server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,15 +259,15 @@ async fn run_server(components: &ComponentsToRun) {
chain_config.state_keeper.block_chunk_sizes,
));
let private_config = PrivateApiConfig::from_env();
zksync_api::api_server::rest::start_server_thread_detached(
tasks.push(zksync_api::api_server::rest::start_server_thread_detached(
read_only_connection_pool.clone(),
RestApiConfig::from_env().bind_addr(),
contracts_config.contract_addr,
ticker,
sign_check_sender,
mempool_tx_request_sender,
private_config.url,
);
));
}
}

Expand Down
3 changes: 1 addition & 2 deletions core/bin/zksync_api/src/api_server/rest/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,8 @@ pub fn start_server_thread_detached(
std::thread::Builder::new()
.name("actix-rest-api".to_string())
.spawn(move || {
let _panic_sentinel = ThreadPanicNotify(panic_sender.clone());

actix_rt::System::new().block_on(async move {
let _panic_sentinel = ThreadPanicNotify(panic_sender.clone());
// TODO remove this config ZKS-815
let config = ZkSyncConfig::from_env();

Expand Down

0 comments on commit e024ca8

Please sign in to comment.