docs: public void setMaxConnections(int maxConnections) {
          int adjustment;
          lock.lock();
          try {
              this.maxConnections = maxConnections;
              if (!isRunning()) return;
          } finally {
              lock.unlock();
          }
          // We may now have too many or too few open connections. Add more or drop some to get to the right amount.
          adjustment = maxConnections - channels.getConnectedClientCount();
          if (adjustment > 0)
              triggerConnections();
  
          if (adjustment < 0)
              channels.closeConnections(-adjustment);
      }