From 634a2baeac56de44829fac12cfdc9c4aab4e9483 Mon Sep 17 00:00:00 2001 From: Rushmore Mushambi Date: Sun, 11 Feb 2024 14:36:47 +0200 Subject: [PATCH] Fix the five second delay in Wasm after initial connection (#3478) --- lib/src/api/engine/remote/ws/native.rs | 2 -- lib/src/api/engine/remote/ws/wasm.rs | 2 -- 2 files changed, 4 deletions(-) diff --git a/lib/src/api/engine/remote/ws/native.rs b/lib/src/api/engine/remote/ws/native.rs index de04bc0e..f8f8a696 100644 --- a/lib/src/api/engine/remote/ws/native.rs +++ b/lib/src/api/engine/remote/ws/native.rs @@ -198,8 +198,6 @@ pub(crate) fn router( let mut interval = time::interval(PING_INTERVAL); // don't bombard the server with pings if we miss some ticks interval.set_missed_tick_behavior(MissedTickBehavior::Delay); - // Delay sending the first ping - interval.tick().await; let pinger = IntervalStream::new(interval); diff --git a/lib/src/api/engine/remote/ws/wasm.rs b/lib/src/api/engine/remote/ws/wasm.rs index 46d28dc2..1d2d4213 100644 --- a/lib/src/api/engine/remote/ws/wasm.rs +++ b/lib/src/api/engine/remote/ws/wasm.rs @@ -171,8 +171,6 @@ pub(crate) fn router( let mut interval = time::interval(PING_INTERVAL); // don't bombard the server with pings if we miss some ticks interval.set_missed_tick_behavior(MissedTickBehavior::Delay); - // Delay sending the first ping - interval.tick().await; let pinger = IntervalStream::new(interval);