Revert "Refactor heartbeat task to support WebAssembly"

This reverts commit 8c2364b8d0.
This commit is contained in:
bitfl0wer 2023-11-20 15:14:28 +01:00
parent 8c2364b8d0
commit 509733bfb8
1 changed files with 0 additions and 5 deletions

View File

@ -33,14 +33,9 @@ impl HeartbeatHandler {
let (send, receive) = tokio::sync::mpsc::channel(32); let (send, receive) = tokio::sync::mpsc::channel(32);
let kill_receive = kill_rc.resubscribe(); let kill_receive = kill_rc.resubscribe();
#[cfg(not(target_arch = "wasm32"))]
let handle: JoinHandle<()> = task::spawn(async move { let handle: JoinHandle<()> = task::spawn(async move {
Self::heartbeat_task(websocket_tx, heartbeat_interval, receive, kill_receive).await; Self::heartbeat_task(websocket_tx, heartbeat_interval, receive, kill_receive).await;
}); });
#[cfg(target_arch = "wasm32")]
let handle: JoinHandle<()> = task::spawn_local(move || {
Self::heartbeat_task(websocket_tx, heartbeat_interval, receive, kill_receive);
});
Self { Self {
heartbeat_interval, heartbeat_interval,