Skip to content

Commit

Permalink
fixed onClose
Browse files Browse the repository at this point in the history
  • Loading branch information
wdn5349 authored Apr 30, 2024
1 parent 539f0ca commit 0c3edfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/cse3310/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public void onClose(WebSocket conn, int code, String reason, boolean remote) {
ActiveUsers.remove(ActiveUsers.indexOf(thisUser));
}

if (usersIngame < 2) {
if ((usersIngame < 2) && (gameid != -1)) {
forceDisconnect(gameid);
for (User u : ActiveUsers) {
if (u.GameId == gameid) {
Expand Down

0 comments on commit 0c3edfb

Please sign in to comment.