Skip to content

Commit

Permalink
Fixed not being able to connect to a non-default port server
Browse files Browse the repository at this point in the history
  • Loading branch information
davue committed Aug 9, 2020
1 parent 348f00e commit 600be7e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/com/github/davue/pss/ui/MainController.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ public void connect() {
return;
}

Main.client.hostname = addressField.getText();
String[] address = addressField.getText().strip().split(":");

Main.client.hostname = address[0];
Main.client.port = address.length == 2 ? Integer.parseInt(address[1]) : 0;
Main.client.password = passwordField.getText().strip();
Main.client.name = nameField.getText().strip();

Expand Down

0 comments on commit 600be7e

Please sign in to comment.