do not call disconnect() unless connecting/ed. This prevents trying to connect after closing the tab

This commit is contained in:
Zlatin Balevsky
2019-11-16 15:25:23 +00:00
parent 286a0a8678
commit 57c4a00ac6

View File

@@ -80,7 +80,8 @@ class ChatServerView {
}
def closeTab = {
controller.disconnect()
if (model.buttonText == "Disconnect")
controller.disconnect()
int index = parent.indexOfComponent(pane)
parent.removeTabAt(index)
mvcGroup.destroy()