Fix too many open files on server
This commit is contained in:
		
							parent
							
								
									e836e62a2b
								
							
						
					
					
						commit
						ff931a0b53
					
				|  | @ -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) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue