Skip to content

Commit

Permalink
panic: remove msg send
Browse files Browse the repository at this point in the history
this doesn't work because:

Cannot start a runtime from within a runtime.
This happens because a function (like `block_on`)
attempted to block the current thread while the thread
is being used to drive asynchronous tasks.
  • Loading branch information
hinto-janai committed Jul 30, 2024
1 parent eaf3472 commit c0dc4ed
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/panic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,5 @@ Stack backtrace:\n{stack_trace}
);

println!("{panic_info}");

// Send panic message to room.
tokio::runtime::Handle::current().block_on(async move {
let msg = RoomMessageEventContent::text_markdown(panic_info);
crate::free::send(msg).await.unwrap();
});
}));
}

0 comments on commit c0dc4ed

Please sign in to comment.