{"action":"closed","issue":{"url":"https://api.github.com/repos/LonamiWebs/Telethon/issues/809","repository_url":"https://api.github.com/repos/LonamiWebs/Telethon","labels_url":"https://api.github.com/repos/LonamiWebs/Telethon/issues/809/labels{/name}","comments_url":"https://api.github.com/repos/LonamiWebs/Telethon/issues/809/comments","events_url":"https://api.github.com/repos/LonamiWebs/Telethon/issues/809/events","html_url":"https://github.com/LonamiWebs/Telethon/issues/809","id":325220432,"node_id":"MDU6SXNzdWUzMjUyMjA0MzI=","number":809,"title":"Multiple workers have problem in download","user":{"login":"hnikaein","id":3269519,"node_id":"MDQ6VXNlcjMyNjk1MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/3269519?v=4","gravatar_id":"","url":"https://api.github.com/users/hnikaein","html_url":"https://github.com/hnikaein","followers_url":"https://api.github.com/users/hnikaein/followers","following_url":"https://api.github.com/users/hnikaein/following{/other_user}","gists_url":"https://api.github.com/users/hnikaein/gists{/gist_id}","starred_url":"https://api.github.com/users/hnikaein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hnikaein/subscriptions","organizations_url":"https://api.github.com/users/hnikaein/orgs","repos_url":"https://api.github.com/users/hnikaein/repos","events_url":"https://api.github.com/users/hnikaein/events{/privacy}","received_events_url":"https://api.github.com/users/hnikaein/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-05-22T09:53:15Z","updated_at":"2018-06-14T14:33:33Z","closed_at":"2018-06-14T14:33:33Z","author_association":"CONTRIBUTOR","body":"In this code:\r\n```python\r\nclient = TelegramClient(\"name\", API_ID, API_HASH, spawn_read_thread=False)\r\nclient.updates.workers = 10\r\nclient.connect()\r\n\r\n@client.on(events.NewMessage(incoming=True))\r\ndef handler(event):\r\n    try:\r\n        client.download_media(event.message.media, 'media/%d' % event.message.id)\r\n    except:\r\n        event.reply(\"error on this one\")\r\n\r\nclient.idle()\r\n```\r\nwhen I set workers to 10, I have problem with download of albums... But when I set it to one, everything works good. My telethon version: 0.19.0.1. The log is like this:\r\n\r\n<details><summary>Log</summary><pre>2018-05-22 14:05:28_telethon.telegram_bare_client_INFO: Connecting to 149.154.167.92:443...\r\n2018-05-22 14:05:28_telethon.telegram_bare_client_INFO: Connection success!\r\n2018-05-22 14:05:28_telethon.telegram_bare_client_INFO: Initializing a new connection while invoking\r\n2018-05-22 14:05:29_telethon.telegram_bare_client_WARNING: Connection was reset while invoking\r\n2018-05-22 14:05:29_telethon.network.mtproto_sender_INFO: Disconnecting MtProtoSender...\r\n2018-05-22 14:05:29_telethon.network.mtproto_sender_INFO: Abruptly confirming TLMessage\r\n2018-05-22 14:05:29_telethon.telegram_bare_client_INFO: Invoking GetStateRequest failed 1 times, connecting again and retrying\r\n2018-05-22 14:05:30_telethon.telegram_bare_client_INFO: Attempting reconnection...\r\n2018-05-22 14:05:30_telethon.telegram_bare_client_INFO: Connecting to 149.154.167.92:443...\r\n2018-05-22 14:05:30_telethon.telegram_bare_client_INFO: Connection success!\r\n2018-05-22 14:05:30_telethon.telegram_bare_client_INFO: Initializing a new connection while invoking\r\n2018-05-22 14:05:32_telethon.telegram_bare_client_INFO: Idling to receive items from the network\r\n2018-05-22 14:05:39_telethon.telegram_client_INFO: Downloading file in chunks of 131072 bytes\r\n2018-05-22 14:05:39_telethon.telegram_client_INFO: Downloading file in chunks of 131072 bytes\r\n2018-05-22 14:05:39_telethon.telegram_client_INFO: Downloading file in chunks of 131072 bytes\r\n2018-05-22 14:05:39_telethon.telegram_client_INFO: Downloading file in chunks of 131072 bytes\r\n2018-05-22 14:05:39_telethon.telegram_client_INFO: Downloading file in chunks of 131072 bytes\r\n2018-05-22 14:05:39_telethon.telegram_client_INFO: Downloading file in chunks of 131072 bytes\r\n2018-05-22 14:05:39_telethon.telegram_client_INFO: Downloading file in chunks of 131072 bytes\r\n2018-05-22 14:05:49_telethon.telegram_bare_client_INFO: Invoking GetFileRequest failed 1 times, connecting again and retrying\r\n2018-05-22 14:05:49_telethon.telegram_bare_client_INFO: Invoking GetFileRequest failed 1 times, connecting again and retrying\r\n2018-05-22 14:05:49_telethon.telegram_bare_client_INFO: Invoking GetFileRequest failed 1 times, connecting again and retrying\r\n2018-05-22 14:05:49_telethon.telegram_bare_client_INFO: Invoking GetFileRequest failed 1 times, connecting again and retrying\r\n2018-05-22 14:05:49_telethon.telegram_bare_client_INFO: Invoking GetFileRequest failed 1 times, connecting again and retrying\r\n2018-05-22 14:05:49_telethon.telegram_bare_client_INFO: Invoking GetFileRequest failed 1 times, connecting again and retrying\r\n2018-05-22 14:05:50_telethon.telegram_bare_client_INFO: Reconnection aborted: already connected\r\n2018-05-22 14:05:50_telethon.telegram_bare_client_INFO: Reconnection aborted: already connected\r\n2018-05-22 14:05:50_telethon.telegram_bare_client_INFO: Reconnection aborted: already connected\r\n2018-05-22 14:05:50_telethon.telegram_bare_client_INFO: Reconnection aborted: already connected\r\n2018-05-22 14:05:50_telethon.telegram_bare_client_INFO: Reconnection aborted: already connected\r\n2018-05-22 14:05:50_telethon.telegram_bare_client_INFO: Reconnection aborted: already connected\r\n2018-05-22 14:05:56_telethon.telegram_bare_client_INFO: Invoking GetFileRequest failed 1 times, connecting again and retrying\r\n2018-05-22 14:05:57_telethon.telegram_bare_client_INFO: Reconnection aborted: already connected\r\n2018-05-22 14:06:00_telethon.telegram_bare_client_WARNING: Invoking GetFileRequest failed 2 times, connecting again and retrying\r\n2018-05-22 14:06:01_telethon.telegram_bare_client_INFO: Reconnection aborted: already connected\r\n2018-05-22 14:06:01_telethon.telegram_bare_client_INFO: Invoking GetFileRequest failed 1 times, connecting again and retrying\r\n2018-05-22 14:06:02_telethon.telegram_bare_client_INFO: Reconnection aborted: already connected\r\n2018-05-22 14:06:03_telethon.telegram_bare_client_INFO: Invoking GetFileRequest failed 1 times, connecting again and retrying\r\n2018-05-22 14:06:04_telethon.telegram_bare_client_INFO: Reconnection aborted: already connected\r\n2018-05-22 14:06:05_telethon.telegram_bare_client_INFO: Invoking GetFileRequest failed 1 times, connecting again and retrying\r\n2018-05-22 14:06:06_telethon.telegram_bare_client_INFO: Reconnection aborted: already connected\r\n2018-05-22 14:06:07_telethon.telegram_bare_client_WARNING: Invoking GetFileRequest failed 2 times, connecting again and retrying\r\n2018-05-22 14:06:08_telethon.telegram_bare_client_INFO: Reconnection aborted: already connected\r\n2018-05-22 14:06:09_telethon.telegram_bare_client_INFO: Invoking GetFileRequest failed 1 times, connecting again and retrying\r\n2018-05-22 14:06:10_telethon.telegram_bare_client_INFO: Reconnection aborted: already connected\r\n2018-05-22 14:06:10_telethon.telegram_bare_client_INFO: Invoking GetFileRequest failed 1 times, connecting again and retrying\r\n2018-05-22 14:06:11_telethon.telegram_bare_client_INFO: Reconnection aborted: already connected\r\n2018-05-22 14:06:12_telethon.telegram_bare_client_WARNING: Invoking GetFileRequest failed 2 times, connecting again and retrying\r\n2018-05-22 14:06:13_telethon.telegram_bare_client_INFO: Reconnection aborted: already connected\r\n2018-05-22 14:06:14_telethon.telegram_bare_client_WARNING: Invoking GetFileRequest failed 2 times, connecting again and retrying\r\n2018-05-22 14:06:15_telethon.telegram_bare_client_INFO: Reconnection aborted: already connected\r\n2018-05-22 14:06:16_telethon.telegram_bare_client_WARNING: Invoking GetFileRequest failed 2 times, connecting again and retrying\r\n2018-05-22 14:06:17_telethon.telegram_bare_client_INFO: Reconnection aborted: already connected\r\n2018-05-22 14:06:20_telethon.telegram_bare_client_WARNING: Invoking GetFileRequest failed 2 times, connecting again and retrying\r\n2018-05-22 14:06:21_telethon.telegram_bare_client_INFO: Reconnection aborted: already connected\r\n2018-05-22 14:06:21_telethon.telegram_bare_client_INFO: Invoking GetFileRequest failed 1 times, connecting again and retrying\r\n2018-05-22 14:06:21_telethon.telegram_bare_client_WARNING: Invoking GetFileRequest failed 2 times, connecting again and retrying\r\n2018-05-22 14:06:22_telethon.telegram_bare_client_INFO: Reconnection aborted: already connected\r\n2018-05-22 14:06:22_telethon.telegram_bare_client_INFO: Reconnection aborted: already connected\r\n2018-05-22 14:06:23_telethon.telegram_bare_client_WARNING: Invoking GetFileRequest failed 3 times, connecting again and retrying\r\n2018-05-22 14:06:24_telethon.telegram_bare_client_INFO: Reconnection aborted: already connected\r\n2018-05-22 14:06:25_telethon.telegram_bare_client_WARNING: Invoking GetFileRequest failed 3 times, connecting again and retrying\r\n2018-05-22 14:06:26_telethon.telegram_bare_client_INFO: Reconnection aborted: already connected\r\n2018-05-22 14:06:27_telethon.telegram_bare_client_WARNING: Invoking GetFileRequest failed 3 times, connecting again and retrying\r\n2018-05-22 14:06:28_telethon.telegram_bare_client_INFO: Reconnection aborted: already connected\r\n2018-05-22 14:06:32_telethon.telegram_bare_client_WARNING: Invoking GetFileRequest failed 2 times, connecting again and retrying\r\n2018-05-22 14:06:33_telethon.telegram_bare_client_INFO: Reconnection aborted: already connected\r\n```</pre></details>"}}
{"actor":{"display_login":"Lonami"}}