Properly dispose of StreamReaders

This commit is contained in:
Slendy 2023-02-11 19:08:44 -06:00
parent 75a5e70635
commit 14fa5e9328
No known key found for this signature in database
GPG key ID: 7288D68361B91428
5 changed files with 17 additions and 7 deletions
ProjectLighthouse.Servers.GameServer/Controllers/Matching

View file

@ -44,7 +44,7 @@ public class MatchController : ControllerBase
// Example POST /match: [UpdateMyPlayerData,["Player":"FireGamer9872"]]
string bodyString = await new StreamReader(this.Request.Body).ReadToEndAsync();
string bodyString = await this.ReadBodyAsync();
if (bodyString.Length == 0 || bodyString[0] != '[') return this.BadRequest();