diff --git a/Server/src/main/java/uulm/teamname/marvelous/server/netconnector/UserManager.java b/Server/src/main/java/uulm/teamname/marvelous/server/netconnector/UserManager.java index 5b3ebf1..c085759 100644 --- a/Server/src/main/java/uulm/teamname/marvelous/server/netconnector/UserManager.java +++ b/Server/src/main/java/uulm/teamname/marvelous/server/netconnector/UserManager.java @@ -7,6 +7,7 @@ import uulm.teamname.marvelous.gamelibrary.json.ValidationUtility; import uulm.teamname.marvelous.gamelibrary.messages.BasicMessage; import uulm.teamname.marvelous.gamelibrary.messages.ErrorMessage; import uulm.teamname.marvelous.gamelibrary.messages.client.*; +import uulm.teamname.marvelous.gamelibrary.messages.server.GoodbyeClientMessage; import uulm.teamname.marvelous.gamelibrary.messages.server.HelloClientMessage; import uulm.teamname.marvelous.server.Server; import uulm.teamname.marvelous.server.lobbymanager.LobbyManager; @@ -290,6 +291,9 @@ public class UserManager { var suid = new SUID(participant.name, participant.deviceID); activeParticipants.remove(suid); } + var message = new GoodbyeClientMessage(); + message.message = "You got disconnected"; + sendMessage(conn, message); conn.close(CloseFrame.NORMAL); // this automatically calls disconnectUser through the MarvelousServer }