Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

Commit

Permalink
Fixed bug when connecting to client immediately after registering it
Browse files Browse the repository at this point in the history
  • Loading branch information
iguanastin committed Dec 5, 2017
1 parent b4fb1a5 commit e304eaa
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,14 @@ public void cancelRegisterOnAction(ActionEvent event) {

private void closeRegisterWindow() {
Platform.runLater(() -> {
if (client != null) client.removeRegisterListener(this);
if (client != null) {
client.removeRegisterListener(this);
try {
client.disconnect();
} catch (IOException e) {
logger.error("Error disconnecting client", e);
}
}
registerUsernameField.getScene().getWindow().hide();
});
}
Expand Down

0 comments on commit e304eaa

Please sign in to comment.