private Server serverStart(int firstPort) throws IOException {
        int port, tries;
        if (firstPort < 0) {
            port = FreeCol.getDefaultPort();
            tries = 10;
        } else {
            port = firstPort;
            tries = 1;
        }
        logger.finest("serverStart(" + firstPort + ") => " + port
            + " x " + tries);
        for (int i = tries; i > 0; i--) {
            try {
                server = new Server(this, port);
                this.port = port;
                server.start();
                break;
            } catch (BindException be) {
                if (i == 1) {
                    logger.log(Level.WARNING, "Bind exception starting server.",
                        be);
                    throw new IOException(be.getMessage());
                }
            } catch (IOException ie) {
                if (i == 1) {
                    logger.log(Level.WARNING, "IO exception starting server.",
                        ie);
                    throw ie;
                }
            }
            port++;
        }
        return server;
    }