Skip to content

Commit

Permalink
Fix up error on quit. Fixes #95
Browse files Browse the repository at this point in the history
  • Loading branch information
matty-r committed Feb 2, 2024
1 parent bf6153e commit a23f4bd
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/urChatBasic/backend/MessageHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -817,10 +817,15 @@ public class DisconnectErrorMessage implements MessageBase
@Override
public void messageExec (Message myMessage)
{
Constants.LOGGER.error(myMessage.getBody());
MessageDialog dialog = new MessageDialog("startUp() failed! " + myMessage.getBody(), "Error", JOptionPane.ERROR_MESSAGE);
dialog.setVisible(true);
// new DisconnectMessage().messageExec(myMessage);
// Are we just quitting, then don't show an error message.
if(myMessage.getBody().contains("Goodbye cruel world"))
{
gui.quitServer(myMessage.messageHandler.serverBase);
} else {
Constants.LOGGER.error(myMessage.getBody());
MessageDialog dialog = new MessageDialog("startUp() failed! " + myMessage.getBody(), "Error", JOptionPane.ERROR_MESSAGE);
dialog.setVisible(true);
}
}
}

Expand Down

0 comments on commit a23f4bd

Please sign in to comment.