Don't reconnect if not necessary
This commit is contained in:
@@ -89,6 +89,7 @@ class MainViewController: UIViewController, SwitchesViewControllerDelegate {
|
|||||||
{
|
{
|
||||||
_headerView.xionLogoView.beginAnimating()
|
_headerView.xionLogoView.beginAnimating()
|
||||||
|
|
||||||
|
if (!_server.connected) {
|
||||||
_updateConnectivityStatus(.Connecting)
|
_updateConnectivityStatus(.Connecting)
|
||||||
_server.connect { (error: NSError?) -> Void in
|
_server.connect { (error: NSError?) -> Void in
|
||||||
if (error == nil) {
|
if (error == nil) {
|
||||||
@@ -99,6 +100,7 @@ class MainViewController: UIViewController, SwitchesViewControllerDelegate {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override func viewDidDisappear(animated: Bool)
|
override func viewDidDisappear(animated: Bool)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user