mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-01-19 05:33:31 +01:00
Make sure SSH does not throw in separate thread
This commit is contained in:
parent
81843fb609
commit
92777ba181
@ -70,6 +70,8 @@ namespace BTCPayServer
|
||||
sshCommand.CommandTimeout = v;
|
||||
var tcs = new TaskCompletionSource<SSHCommandResult>(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||
new Thread(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
sshCommand.BeginExecute(ar =>
|
||||
{
|
||||
@ -87,6 +89,8 @@ namespace BTCPayServer
|
||||
sshCommand.Dispose();
|
||||
}
|
||||
});
|
||||
}
|
||||
catch(Exception ex) { tcs.TrySetException(ex); }
|
||||
})
|
||||
{ IsBackground = true }.Start();
|
||||
return tcs.Task;
|
||||
|
@ -1,5 +1,5 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<Version>1.0.3.139</Version>
|
||||
<Version>1.0.3.141</Version>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user