mirror of
https://gitlab.com/fabinfra/fabaccess/borepin.git
synced 2025-03-12 06:41:54 +01:00
Merge branch 'fix/changeconnetionhangup' into 'main'
Fixed: Hangup on change connection while connected See merge request fabinfra/fabaccess/borepin!80
This commit is contained in:
commit
2c71fc3949
@ -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