Revert "Refactor heartbeat task to support WebAssembly"
This reverts commit f0a4fe62eb
.
This commit is contained in:
parent
f0a4fe62eb
commit
0ff02447fc
|
@ -33,14 +33,9 @@ impl HeartbeatHandler {
|
|||
let (send, receive) = tokio::sync::mpsc::channel(32);
|
||||
let kill_receive = kill_rc.resubscribe();
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
let handle: JoinHandle<()> = task::spawn(async move {
|
||||
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 {
|
||||
heartbeat_interval,
|
||||
|
|
Loading…
Reference in New Issue