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

pull/34/head
Zlatin Balevsky 2019-11-16 15:25:23 +00:00
parent 286a0a8678
commit 57c4a00ac6
1 changed files with 2 additions and 1 deletions

View File

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