mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-07 17:47:17 +02:00
clear timer before starting new one
This commit is contained in:
@@ -1034,6 +1034,9 @@ class App extends React.Component<ExcalidrawProps, AppState> {
|
||||
const speed = await getNetworkSpeed();
|
||||
const networkSpeed = speed === "-1" ? "Error!" : speed;
|
||||
this.setState({ networkSpeed });
|
||||
if (this.netStatsIntervalId) {
|
||||
clearTimeout(this.netStatsIntervalId);
|
||||
}
|
||||
this.netStatsIntervalId = setTimeout(
|
||||
this.calculateNetStats,
|
||||
NETWORK_SPEED_TIMEOUT_MS,
|
||||
|
Reference in New Issue
Block a user