aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Network/NetworkService.cs
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2022-11-01 19:04:17 -0500
committerJP Dillingham <jp@dillingham.me>2022-11-01 19:04:17 -0500
commit4d45a5fe303c27869db80015c2e540453d073b27 (patch)
treeadfee75613424bbbf9bb3e8e04bc61f26e531d4a /src/slskd/Network/NetworkService.cs
parente91142e70607196cc359763c175ed92e900dfcc8 (diff)
downloadslskd-4d45a5fe303c27869db80015c2e540453d073b27.tar.gz
add verbose logging
Diffstat (limited to 'src/slskd/Network/NetworkService.cs')
-rw-r--r--src/slskd/Network/NetworkService.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/slskd/Network/NetworkService.cs b/src/slskd/Network/NetworkService.cs
index 38437073..65ac05bd 100644
--- a/src/slskd/Network/NetworkService.cs
+++ b/src/slskd/Network/NetworkService.cs
@@ -353,6 +353,8 @@ namespace slskd.Network
var key = new WaitKey(nameof(GetFileInfoAsync), agentName, id);
var wait = Waiter.Wait<(bool Exists, long Length)>(key, timeout);
+ Log.Information("Created wait {Key}", key);
+
try
{
await NetworkHub.Clients.Client(record.ConnectionId).RequestFileInfo(filename, id);
@@ -427,6 +429,8 @@ namespace slskd.Network
var key = new WaitKey(nameof(GetFileStreamAsync), agentName, id);
var wait = Waiter.Wait<Stream>(key, timeout, cancellationToken);
+ Log.Information("Created wait {Key}", key);
+
await NetworkHub.Clients.Client(record.ConnectionId).RequestFileUpload(filename, id);
Log.Information("Requested file {Filename} from Agent {Agent} with ID {Id}. Waiting for incoming connection.", filename, agentName, id);
@@ -455,6 +459,8 @@ namespace slskd.Network
{
var key = new WaitKey(nameof(GetFileInfoAsync), agentName, id);
+ Log.Information("Handling wait {Key}", key);
+
if (!Waiter.IsWaitingFor(key))
{
var msg = $"A file info response from Agent {agentName} matching Id {id} was not expected";
@@ -480,6 +486,8 @@ namespace slskd.Network
{
var streamKey = new WaitKey(nameof(GetFileStreamAsync), agentName, id);
+ Log.Information("Handling wait {Key}", streamKey);
+
if (!Waiter.IsWaitingFor(streamKey))
{
var msg = $"A file stream response matching Id {id} is not expected";