mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
Fix multiple threads reading stream.
This commit is contained in:
parent
8a1a4a5bdf
commit
e899f9f6cf
@ -52,6 +52,7 @@ namespace Remotely.Agent.Services
|
||||
return;
|
||||
}
|
||||
chatSession = new ChatSession() { PipeStream = clientPipe, ProcessID = procID };
|
||||
_ = Task.Run(async () => { await ReadFromStream(chatSession.PipeStream, senderConnectionID, hubConnection); });
|
||||
ChatClients.Add(senderConnectionID, chatSession, CacheItemPolicy);
|
||||
}
|
||||
|
||||
@ -69,8 +70,6 @@ namespace Remotely.Agent.Services
|
||||
await sw.WriteLineAsync(message);
|
||||
await sw.FlushAsync();
|
||||
}
|
||||
|
||||
_ = Task.Run(async () => { await ReadFromStream(chatSession.PipeStream, senderConnectionID, hubConnection); });
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user