mirror of
https://gitlab.com/fabinfra/fabaccess/borepin.git
synced 2025-03-12 06:41:54 +01:00
Fixed: Hangup on change connection while connected
This commit is contained in:
parent
75da7b6534
commit
6b46303607
@ -111,17 +111,13 @@ namespace Borepin.PageModel.AddServerProcess
|
||||
},
|
||||
};
|
||||
|
||||
if (_API.IsConnected)
|
||||
try
|
||||
{
|
||||
if (_API.IsConnected)
|
||||
if (_API.IsConnecting || _API.IsConnected)
|
||||
{
|
||||
await _API.Disconnect().ConfigureAwait(true);
|
||||
_API.UnbindEventHandler();
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
await _API.Connect(_ConnectionData).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception exception)
|
||||
|
@ -133,13 +133,14 @@ namespace Borepin.PageModel
|
||||
IsBusy = true;
|
||||
TestConnection = true;
|
||||
|
||||
if (_API.IsConnected)
|
||||
{
|
||||
await _API.Disconnect().ConfigureAwait(true);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (_API.IsConnecting || _API.IsConnected)
|
||||
{
|
||||
await _API.Disconnect().ConfigureAwait(true);
|
||||
_API.UnbindEventHandler();
|
||||
}
|
||||
|
||||
await _API.Connect(Connection_Item).ConfigureAwait(false);
|
||||
}
|
||||
catch(Exception exception)
|
||||
|
Loading…
x
Reference in New Issue
Block a user