{"action":"created","issue":{"url":"https://api.github.com/repos/LonamiWebs/Telethon/issues/755","repository_url":"https://api.github.com/repos/LonamiWebs/Telethon","labels_url":"https://api.github.com/repos/LonamiWebs/Telethon/issues/755/labels{/name}","comments_url":"https://api.github.com/repos/LonamiWebs/Telethon/issues/755/comments","events_url":"https://api.github.com/repos/LonamiWebs/Telethon/issues/755/events","html_url":"https://github.com/LonamiWebs/Telethon/pull/755","id":313048748,"number":755,"title":"Connection checks","user":{"login":"ferferga","id":10274099,"avatar_url":"https://avatars0.githubusercontent.com/u/10274099?v=4","gravatar_id":"","url":"https://api.github.com/users/ferferga","html_url":"https://github.com/ferferga","followers_url":"https://api.github.com/users/ferferga/followers","following_url":"https://api.github.com/users/ferferga/following{/other_user}","gists_url":"https://api.github.com/users/ferferga/gists{/gist_id}","starred_url":"https://api.github.com/users/ferferga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ferferga/subscriptions","organizations_url":"https://api.github.com/users/ferferga/orgs","repos_url":"https://api.github.com/users/ferferga/repos","events_url":"https://api.github.com/users/ferferga/events{/privacy}","received_events_url":"https://api.github.com/users/ferferga/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-10T18:57:17Z","updated_at":"2018-04-10T21:27:27Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/LonamiWebs/Telethon/pulls/755","html_url":"https://github.com/LonamiWebs/Telethon/pull/755","diff_url":"https://github.com/LonamiWebs/Telethon/pull/755.diff","patch_url":"https://github.com/LonamiWebs/Telethon/pull/755.patch"},"body":"Instead of rasing an exception when running client.start() without an active internet connection, Telethon will handle it itself, advising the user to check his internet connection. The connection will be tried in a loop, until the connection is established, breaking the loop."},"comment":{"url":"https://api.github.com/repos/LonamiWebs/Telethon/issues/comments/380252340","html_url":"https://github.com/LonamiWebs/Telethon/pull/755#issuecomment-380252340","issue_url":"https://api.github.com/repos/LonamiWebs/Telethon/issues/755","id":380252340,"user":{"login":"vegeta1k95","id":32207817,"avatar_url":"https://avatars3.githubusercontent.com/u/32207817?v=4","gravatar_id":"","url":"https://api.github.com/users/vegeta1k95","html_url":"https://github.com/vegeta1k95","followers_url":"https://api.github.com/users/vegeta1k95/followers","following_url":"https://api.github.com/users/vegeta1k95/following{/other_user}","gists_url":"https://api.github.com/users/vegeta1k95/gists{/gist_id}","starred_url":"https://api.github.com/users/vegeta1k95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vegeta1k95/subscriptions","organizations_url":"https://api.github.com/users/vegeta1k95/orgs","repos_url":"https://api.github.com/users/vegeta1k95/repos","events_url":"https://api.github.com/users/vegeta1k95/events{/privacy}","received_events_url":"https://api.github.com/users/vegeta1k95/received_events","type":"User","site_admin":false},"created_at":"2018-04-10T21:27:27Z","updated_at":"2018-04-10T21:27:27Z","author_association":"CONTRIBUTOR","body":"If you want your main thread to be stuck in an infinite loop you can do this:\r\n```\r\nimport time\r\nclient = TelegramClient(...)\r\nwhile not client.is_connected():\r\n    try:\r\n        client.connect()\r\n    except ConnectionError:\r\n        print(\"Connection error. Retrying in 5 seconds...\")\r\n        time.sleep(5)\r\n```\r\nNo need to hardcode it in a client.\r\n"}}
{"actor":{"display_login":"vegeta1k95"}}