Skip to content

Commit

Permalink
Don't dispose the AniDB connection at first time setup
Browse files Browse the repository at this point in the history
  • Loading branch information
da3dsoul committed Nov 10, 2024
1 parent 2c48be2 commit eef67dd
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions Shoko.Server/API/v3/Controllers/SettingsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ public async Task<ActionResult> TestAniDB([FromBody] Credentials credentials)
return ValidationProblem(ModelState);
}

var alive = _udpHandler.IsAlive;
var settings = SettingsProvider.GetSettings();
if (!_udpHandler.IsAlive)
await _udpHandler.Init(credentials.Username, credentials.Password, settings.AniDb.UDPServerAddress, settings.AniDb.UDPServerPort, settings.AniDb.ClientPort);
Expand All @@ -97,7 +96,6 @@ public async Task<ActionResult> TestAniDB([FromBody] Credentials credentials)
return ValidationProblem("Failed to log in.", "Connection");
}

if (!alive) await _udpHandler.CloseConnections();
return Ok();
}

Expand Down

0 comments on commit eef67dd

Please sign in to comment.