Fix too many open files on server

This commit is contained in:
Mike Nolan 2024-10-19 00:24:37 -05:00
parent e836e62a2b
commit ff931a0b53
1 changed files with 3 additions and 2 deletions

View File

@ -14,7 +14,7 @@ bool isRunning=true;
async Task AddVideo(VideoId id)
{
SshClient client = new SshClient(IP,Username,Password);
using(SshClient client = new SshClient(IP,Username,Password)){
await client.ConnectAsync(default);
using(var res=client.CreateCommand($"echo {DirectoryOnServer}/*-{id.Value}.mp4"))
{
@ -36,7 +36,8 @@ async Task AddVideo(VideoId id)
}
client.Disconnect();
}
}
async Task AddItem(string url)