mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-13 13:22:28 +00:00
Properly dispose of StreamReaders
This commit is contained in:
parent
75a5e70635
commit
14fa5e9328
5 changed files with 17 additions and 7 deletions
|
@ -77,8 +77,7 @@ public class ScoreController : ControllerBase
|
|||
|
||||
if (!score.PlayerIds.Contains(username))
|
||||
{
|
||||
this.Request.Body.Position = 0;
|
||||
string bodyString = await new StreamReader(this.Request.Body).ReadToEndAsync();
|
||||
string bodyString = await this.ReadBodyAsync();
|
||||
Logger.Warn("Rejecting score upload, requester username is not present in playerIds" +
|
||||
$" (user={username}, playerIds={string.Join(",", score.PlayerIds)}, " +
|
||||
$"gameVersion={token.GameVersion.ToPrettyString()}, type={score.Type}, id={id}, slotType={slotType}, body='{bodyString}')", LogArea.Score);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue