diff options
| author | telans <telans@protonmail.com> | 2020-06-20 21:12:36 +1200 |
|---|---|---|
| committer | telans <telans@protonmail.com> | 2020-06-20 21:12:36 +1200 |
| commit | 7f307f9082cb4be296e745c2c066334858f000af (patch) | |
| tree | 4f5e3ca5a628624f631ccf1da9deeed90481d9bc /RSSDP/HttpResponseParser.cs | |
| parent | 98db8f72e01b608e6c384ecf5b107fc2d105b652 (diff) | |
brace multiline if statements
Diffstat (limited to 'RSSDP/HttpResponseParser.cs')
| -rw-r--r-- | RSSDP/HttpResponseParser.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/RSSDP/HttpResponseParser.cs b/RSSDP/HttpResponseParser.cs index 0337b3e36..0dd4bb45a 100644 --- a/RSSDP/HttpResponseParser.cs +++ b/RSSDP/HttpResponseParser.cs @@ -34,7 +34,9 @@ namespace Rssdp.Infrastructure catch { if (retVal != null) + { retVal.Dispose(); + } throw; } @@ -77,7 +79,9 @@ namespace Rssdp.Infrastructure int statusCode = -1; if (!Int32.TryParse(parts[1].Trim(), out statusCode)) + { throw new ArgumentException("data status line is invalid. Status code is not a valid integer.", nameof(data)); + } message.StatusCode = (HttpStatusCode)statusCode; |
