mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-24 01:34:45 +03:00
improve httpclient resource disposal
This commit is contained in:
@@ -293,10 +293,13 @@ namespace Emby.Server.Implementations.Security
|
||||
|
||||
options.SetPostData(data);
|
||||
|
||||
using (var json = (await _httpClient.Post(options).ConfigureAwait(false)).Content)
|
||||
using (var response = (await _httpClient.Post(options).ConfigureAwait(false)))
|
||||
{
|
||||
reg = _jsonSerializer.DeserializeFromStream<RegRecord>(json);
|
||||
success = true;
|
||||
using (var json = response.Content)
|
||||
{
|
||||
reg = _jsonSerializer.DeserializeFromStream<RegRecord>(json);
|
||||
success = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (reg.registered)
|
||||
|
||||
Reference in New Issue
Block a user