code: protected void closeServerSocket() {
          // Close server socket, we do not accept new requests anymore.
          // This also terminates the server thread if blocking on socket.accept.
          if (null != serverSocket) {
              try {
                  if (!serverSocket.isClosed()) {
                      serverSocket.close();
                      if (log.isTraceEnabled()) {
                          log.trace("Closed server socket " + serverSocket + "/ref="
                                  + Integer.toHexString(System.identityHashCode(serverSocket))
                                  + " for " + getName());
                      }
                  }
              } catch (IOException e) {
                  throw new IllegalStateException("Failed to successfully quit server " + getName(), e);
              }
          }
      }
docs: Closes the server socket.