code: func (s *Server) EnableDiagnostic(ip string, port int) {
  	s.Lock()
  	defer s.Unlock()
  
  	s.port = port
  
  	if s.enable == 1 {
  		logrus.Info("The server is already up and running")
  		return
  	}
  
  	logrus.Infof("Starting the diagnostic server listening on %d for commands", port)
  	srv := &http.Server{Addr: fmt.Sprintf("%s:%d", ip, port), Handler: s}
  	s.srv = srv
  	s.enable = 1
  	go func(n *Server) {
  		// Ignore ErrServerClosed that is returned on the Shutdown call
  		if err := srv.ListenAndServe(); err != nil && err != http.ErrServerClosed {
  			logrus.Errorf("ListenAndServe error: %s", err)
  			atomic.SwapInt32(&n.enable, 0)
  		}
  	}(s)
  }
docs: // EnableDiagnostic opens a TCP socket to debug the passed network DB