code: public void stop() throws Throwable
     {
        running.set(false);
  
        for (HandlerSocket hs : active)
        {
           hs.shutdown();
        }
  
        if (ss != null)
        {
           try
           {
              ss.close();
           }
           catch (IOException ioe)
           {
              // Ignore
           }
           ss = null;
        }
  
        if (executorService != null)
        {
           try
           {
              executorService.shutdown();
           }
           catch (Throwable t)
           {
              // Nothing to do
           }
           executorService = null;
        }
     }
docs: Stop
  @exception Throwable Thrown if an error occurs