mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-13 16:54:14 +01:00
fix memory leak, try something different for metrics
This commit is contained in:
parent
0dc4436ba3
commit
95586549e5
2 changed files with 4 additions and 2 deletions
|
|
@ -174,7 +174,8 @@ namespace MareSynchronosServer.Hubs
|
|||
{
|
||||
var decodedFile = LZ4.LZ4Codec.Unwrap(uploadedFile.ToArray());
|
||||
using var sha1 = SHA1.Create();
|
||||
var computedHash = await sha1.ComputeHashAsync(new MemoryStream(decodedFile));
|
||||
using var ms = new MemoryStream(decodedFile);
|
||||
var computedHash = await sha1.ComputeHashAsync(ms);
|
||||
var computedHashString = BitConverter.ToString(computedHash).Replace("-", "");
|
||||
if (hash != computedHashString)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -114,7 +114,8 @@ namespace MareSynchronosServer
|
|||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
|
||||
app.UseMetricServer(4980);
|
||||
var metricServer = new KestrelMetricServer(4980);
|
||||
metricServer.Start();
|
||||
|
||||
app.UseStaticFiles(new StaticFileOptions()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue