Skip to content

Commit

Permalink
Add try/catch for WasmModuleClient.Stop()
Browse files Browse the repository at this point in the history
  • Loading branch information
neilenns committed Sep 21, 2024
1 parent 53c3af2 commit 6949c90
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion SimConnectMSFS/SimConnectCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,15 @@ private void SimConnectCache_OnRecvClientData(SimConnect sender, SIMCONNECT_RECV

internal void Stop()
{
WasmModuleClient.Stop(m_oSimConnect, WasmRuntimeClientData);
try
{
WasmModuleClient.Stop(m_oSimConnect, WasmRuntimeClientData);
}
catch (Exception e)
{
Log.Instance.log($"Unable to stop WasmModule: {e.Message}", LogSeverity.Error);
}

ClearSimVars();
}

Expand Down

0 comments on commit 6949c90

Please sign in to comment.