def open_maintenace_socket(self):
        # type: () -> int
        """
        Opens a TCP/SSL socket, connecting it with the maintenance service
        """
        port = random.randint(6000, 7000)
        self._server_thread = BaseThread(name='maintenancesock', target=self._run_socket_server, args=[port])
        self._server_thread.daemon = True
        self._server_thread.start()
        return port