code: private synchronized void doShutdown() {
        active = false;
  
        getLogger().debug("{} doShutdown called", getName());
  
        // close the server socket
        closeServerSocket();
  
        // close all of the accepted sockets
        closeAllAcceptedSockets();
  
        if (advertiseViaMulticastDNS) {
            zeroConf.unadvertise();
        }
      }
docs: Does the actual shutting down by closing the server socket
  and any connected sockets that have been created.