Skip to content

Commit

Permalink
Fix race condition in CMClient.Send (#913)
Browse files Browse the repository at this point in the history
  • Loading branch information
xPaw authored Sep 1, 2020
1 parent 4be02ee commit 6fd97cb
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions SteamKit2/SteamKit2/Steam/CMClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -271,14 +271,18 @@ public void Send( IClientMsg msg )
throw new ArgumentNullException( nameof(msg), "A value for 'msg' must be supplied" );
}

if ( this.SessionID.HasValue )
var sessionID = this.SessionID;

if ( sessionID.HasValue )
{
msg.SessionID = this.SessionID.Value;
msg.SessionID = sessionID.Value;
}

if ( this.SteamID != null )
var steamID = this.SteamID;

if ( steamID != null )
{
msg.SteamID = this.SteamID;
msg.SteamID = steamID;
}

try
Expand Down

0 comments on commit 6fd97cb

Please sign in to comment.