From e66714d0d51552b7228e5deeb4c08d1f2c9c49e3 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Fri, 10 Oct 2025 09:31:41 -0500 Subject: get the user's endpoint before we start (make sure they are online) --- src/slskd/Transfers/Downloads/DownloadService.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src') diff --git a/src/slskd/Transfers/Downloads/DownloadService.cs b/src/slskd/Transfers/Downloads/DownloadService.cs index ba88777c..6a149ff8 100644 --- a/src/slskd/Transfers/Downloads/DownloadService.cs +++ b/src/slskd/Transfers/Downloads/DownloadService.cs @@ -489,6 +489,19 @@ namespace slskd.Transfers.Downloads throw new ArgumentException("At least one file is required", nameof(files)); } + IPEndPoint endpoint; + + try + { + // get the user's ip and port. this will throw if they are offline. + endpoint = await Client.GetUserEndPointAsync(username, cancellationToken); + } + catch (Exception ex) + { + Log.Error(ex, "Failed to enqueue {Count} files from {Username}: {Message}", files.Count(), username, ex.Message); + throw; + } + List acquiredLocks = []; try -- cgit v1.2.3