docs: private void runPrimary() throws Exception {
          try {
              // start the server socket on the right interface
              doBind();
  
              while (true) {
                  try {
                      final int selectedKeyCount = m_selector.select();
                      if (selectedKeyCount == 0) {
                          continue;
                      }
                      Set<SelectionKey> selectedKeys = m_selector.selectedKeys();
                      try {
                          for (SelectionKey key : selectedKeys) {
                              processSSC((ServerSocketChannel)key.channel());
                          }
                      } finally {
                          selectedKeys.clear();
                      }
                  } catch (ClosedByInterruptException | ClosedSelectorException e) {
                      throw new InterruptedException();
                  } catch (Exception e) {
                      LOG.error("Exception occurred in the connection accept loop", e);
                  }
              }
          }
          finally {
              for (ServerSocketChannel ssc : m_listenerSockets) {
                  try {
                      ssc.close();
                  } catch (IOException e) {
                  }
              }
              m_listenerSockets.clear();
              try {
                  m_selector.close();
              } catch (IOException e) {
              }
              m_selector = null;
          }
      }