
    h@                     \    d dl Z d dlZd dlmZ  e j        e          Z G d d          ZdS )    N)rawc                       e Zd Z	 	 ddZdS )	Terminateselfhydrogram.Clientc                   K   | j         st          d          | j        r\|                     t          j        j                                                   d{V  t          	                    d| j                   | j
                                         d{V  | j                                         d{V  | j                                        D ]}|                                 d{V  | j                                         | j                                         | j        | j         d{V  | j                                         d| _         dS )aG  Terminate the client by shutting down workers.

        This method does the opposite of :meth:`~hydrogram.Client.initialize`.
        It will stop the dispatcher and shut down updates and download workers.

        Raises:
            ConnectionError: In case you try to terminate a client that is already terminated.
        zClient is already terminatedNzTakeout session %s finishedF)is_initializedConnectionError
takeout_idinvoker   	functionsaccountFinishTakeoutSessionloginfostoragesave
dispatcherstopmedia_sessionsvaluesclearupdates_watchdog_eventsetupdates_watchdog_task)r   media_sessions     `/var/www/html/auto_sub_bot/venv/lib/python3.11/site-packages/hydrogram/methods/auth/terminate.py	terminatezTerminate.terminate   s|      " 	B!"@AAA? 	E++cm3HHJJKKKKKKKKKHH2DODDDl!!!!!!!!!o""$$$$$$$$$!07799 	' 	'M$$&&&&&&&&&&!!####'')))%1,,,,,,,,#))+++#    N)r   r   )__name__
__module____qualname__r    r   r   r   r      s0        !$ !$ !$ !$ !$ !$ !$r   r   )logging	hydrogramr   	getLoggerr    r   r   r#   r   r   <module>r'      sr   (           g!!"$ "$ "$ "$ "$ "$ "$ "$ "$ "$r   