private void sendMessageToServer(ServerMessage message) {
    while (true) {
      try {
        messageQueue.put(message);
        break;
      }
      catch (InterruptedException e) {
        // continue
      }
    }
  }