code: def stop(self):
          
          stopped = []
          for interface_id, proxy in self.proxies.items():
              if interface_id in self.failed_inits:
                  LOG.warning("ServerThread.stop: Not performing de-init for %s" % interface_id)
                  continue
              if proxy._callbackip and proxy._callbackport:
                  callbackip = proxy._callbackip
                  callbackport = proxy._callbackport
              else:
                  callbackip = proxy._localip
                  callbackport = self._localport
              remote = "http://%s:%i" % (callbackip, callbackport)
              LOG.debug("ServerThread.stop: init('%s')" % remote)
              if not callbackip in stopped:
                  try:
                      proxy.init(remote)
                      stopped.append(callbackip)
                      LOG.info("Proxy de-initialized: %s" % remote)
                  except Exception as err:
                      LOG.debug("proxyInit: Exception: %s" % str(err))
                      LOG.warning("Failed to de-initialize proxy")
          self.proxies.clear()
          LOG.info("Shutting down server")
          self.server.shutdown()
          LOG.debug("ServerThread.stop: Stopping ServerThread")
          self.server.server_close()
          LOG.info("Server stopped")
docs: To stop the server we de-init from the CCU / Homegear, then shut down our XML-RPC server.