Revert "Refactor heartbeat task to support WebAssembly"
This reverts commit 8c2364b8d0
.
This commit is contained in:
parent
8c2364b8d0
commit
509733bfb8
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue