Skip to content

Commit

Permalink
fix: Protect against error spams if connection state is messed up (#2770
Browse files Browse the repository at this point in the history
)
  • Loading branch information
simon-lemay-unity authored Nov 20, 2023
1 parent ccd660d commit a2c6f7d
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,11 @@ private void ExtractNetworkMetricsForClient(ulong transportClientId)

private void ExtractNetworkMetricsFromPipeline(NetworkPipeline pipeline, NetworkConnection networkConnection)
{
if (m_Driver.GetConnectionState(networkConnection) != NetworkConnection.State.Connected)
{
return;
}

//Don't need to dispose of the buffers, they are filled with data pointers.
m_Driver.GetPipelineBuffers(pipeline,
#if UTP_TRANSPORT_2_0_ABOVE
Expand Down

0 comments on commit a2c6f7d

Please sign in to comment.