mirror of
https://gitlab.com/fabinfra/fabaccess/borepin.git
synced 2025-03-12 14:51:44 +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);
|
await _API.Disconnect().ConfigureAwait(true);
|
||||||
_API.UnbindEventHandler();
|
_API.UnbindEventHandler();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
await _API.Connect(_ConnectionData).ConfigureAwait(false);
|
await _API.Connect(_ConnectionData).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch (Exception exception)
|
catch (Exception exception)
|
||||||
|
@ -133,13 +133,14 @@ namespace Borepin.PageModel
|
|||||||
IsBusy = true;
|
IsBusy = true;
|
||||||
TestConnection = true;
|
TestConnection = true;
|
||||||
|
|
||||||
if (_API.IsConnected)
|
|
||||||
{
|
|
||||||
await _API.Disconnect().ConfigureAwait(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (_API.IsConnecting || _API.IsConnected)
|
||||||
|
{
|
||||||
|
await _API.Disconnect().ConfigureAwait(true);
|
||||||
|
_API.UnbindEventHandler();
|
||||||
|
}
|
||||||
|
|
||||||
await _API.Connect(Connection_Item).ConfigureAwait(false);
|
await _API.Connect(Connection_Item).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch(Exception exception)
|
catch(Exception exception)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user