{"action":"created","comment":{"url":"https://api.github.com/repos/opsdroid/opsdroid/pulls/comments/145786134","pull_request_review_id":70638589,"id":145786134,"diff_hunk":"@@ -101,6 +101,9 @@ def restart(self):\n \n     def stop(self):\n         \"\"\"Stop the event loop.\"\"\"\n+        for connector in self.connectors:","path":"opsdroid/core.py","position":4,"original_position":4,"commit_id":"bf8ae0f5ff44ba089adcc517545754f068940559","original_commit_id":"bf8ae0f5ff44ba089adcc517545754f068940559","user":{"login":"jacobtomlinson","id":1610850,"avatar_url":"https://avatars3.githubusercontent.com/u/1610850?v=4","gravatar_id":"","url":"https://api.github.com/users/jacobtomlinson","html_url":"https://github.com/jacobtomlinson","followers_url":"https://api.github.com/users/jacobtomlinson/followers","following_url":"https://api.github.com/users/jacobtomlinson/following{/other_user}","gists_url":"https://api.github.com/users/jacobtomlinson/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobtomlinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobtomlinson/subscriptions","organizations_url":"https://api.github.com/users/jacobtomlinson/orgs","repos_url":"https://api.github.com/users/jacobtomlinson/repos","events_url":"https://api.github.com/users/jacobtomlinson/events{/privacy}","received_events_url":"https://api.github.com/users/jacobtomlinson/received_events","type":"User","site_admin":false},"body":"To be honest you don't even need to create them on the loop. Just wait them.\r\n\r\nChange\r\n\r\n```python\r\nself.eventloop.create_task(connector.disconnect(self))`\r\n```\r\n\r\nto\r\n\r\n```python\r\nawait connector.disconnect(self)\r\n```","created_at":"2017-10-19T18:31:50Z","updated_at":"2017-10-19T18:31:50Z","html_url":"https://github.com/opsdroid/opsdroid/pull/276#discussion_r145786134","pull_request_url":"https://api.github.com/repos/opsdroid/opsdroid/pulls/276","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/opsdroid/opsdroid/pulls/comments/145786134"},"html":{"href":"https://github.com/opsdroid/opsdroid/pull/276#discussion_r145786134"},"pull_request":{"href":"https://api.github.com/repos/opsdroid/opsdroid/pulls/276"}},"in_reply_to_id":145757245},"pull_request":{"url":"https://api.github.com/repos/opsdroid/opsdroid/pulls/276","id":147608098,"html_url":"https://github.com/opsdroid/opsdroid/pull/276","diff_url":"https://github.com/opsdroid/opsdroid/pull/276.diff","patch_url":"https://github.com/opsdroid/opsdroid/pull/276.patch","issue_url":"https://api.github.com/repos/opsdroid/opsdroid/issues/276","number":276,"state":"open","locked":false,"title":"Add a disconnect method","user":{"login":"Cadair","id":1391051,"avatar_url":"https://avatars2.githubusercontent.com/u/1391051?v=4","gravatar_id":"","url":"https://api.github.com/users/Cadair","html_url":"https://github.com/Cadair","followers_url":"https://api.github.com/users/Cadair/followers","following_url":"https://api.github.com/users/Cadair/following{/other_user}","gists_url":"https://api.github.com/users/Cadair/gists{/gist_id}","starred_url":"https://api.github.com/users/Cadair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cadair/subscriptions","organizations_url":"https://api.github.com/users/Cadair/orgs","repos_url":"https://api.github.com/users/Cadair/repos","events_url":"https://api.github.com/users/Cadair/events{/privacy}","received_events_url":"https://api.github.com/users/Cadair/received_events","type":"User","site_admin":false},"body":"This is to address #224 \r\n\r\nI couldn't work out the best way of calling the disconnect coroutine from the main class. My asyncio knowledge gets poor around calling coroutines from functions.","created_at":"2017-10-19T16:43:45Z","updated_at":"2017-10-19T18:31:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ddb02c17c5dd63a8c061d91efef9928018a2cc4e","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/opsdroid/opsdroid/pulls/276/commits","review_comments_url":"https://api.github.com/repos/opsdroid/opsdroid/pulls/276/comments","review_comment_url":"https://api.github.com/repos/opsdroid/opsdroid/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opsdroid/opsdroid/issues/276/comments","statuses_url":"https://api.github.com/repos/opsdroid/opsdroid/statuses/bf8ae0f5ff44ba089adcc517545754f068940559","head":{"label":"Cadair:disconnect","ref":"disconnect","sha":"bf8ae0f5ff44ba089adcc517545754f068940559","user":{"login":"Cadair","id":1391051,"avatar_url":"https://avatars2.githubusercontent.com/u/1391051?v=4","gravatar_id":"","url":"https://api.github.com/users/Cadair","html_url":"https://github.com/Cadair","followers_url":"https://api.github.com/users/Cadair/followers","following_url":"https://api.github.com/users/Cadair/following{/other_user}","gists_url":"https://api.github.com/users/Cadair/gists{/gist_id}","starred_url":"https://api.github.com/users/Cadair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cadair/subscriptions","organizations_url":"https://api.github.com/users/Cadair/orgs","repos_url":"https://api.github.com/users/Cadair/repos","events_url":"https://api.github.com/users/Cadair/events{/privacy}","received_events_url":"https://api.github.com/users/Cadair/received_events","type":"User","site_admin":false},"repo":{"id":107570267,"name":"opsdroid","full_name":"Cadair/opsdroid","owner":{"login":"Cadair","id":1391051,"avatar_url":"https://avatars2.githubusercontent.com/u/1391051?v=4","gravatar_id":"","url":"https://api.github.com/users/Cadair","html_url":"https://github.com/Cadair","followers_url":"https://api.github.com/users/Cadair/followers","following_url":"https://api.github.com/users/Cadair/following{/other_user}","gists_url":"https://api.github.com/users/Cadair/gists{/gist_id}","starred_url":"https://api.github.com/users/Cadair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cadair/subscriptions","organizations_url":"https://api.github.com/users/Cadair/orgs","repos_url":"https://api.github.com/users/Cadair/repos","events_url":"https://api.github.com/users/Cadair/events{/privacy}","received_events_url":"https://api.github.com/users/Cadair/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Cadair/opsdroid","description":"🤖 An open source chat-ops bot framework","fork":true,"url":"https://api.github.com/repos/Cadair/opsdroid","forks_url":"https://api.github.com/repos/Cadair/opsdroid/forks","keys_url":"https://api.github.com/repos/Cadair/opsdroid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Cadair/opsdroid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Cadair/opsdroid/teams","hooks_url":"https://api.github.com/repos/Cadair/opsdroid/hooks","issue_events_url":"https://api.github.com/repos/Cadair/opsdroid/issues/events{/number}","events_url":"https://api.github.com/repos/Cadair/opsdroid/events","assignees_url":"https://api.github.com/repos/Cadair/opsdroid/assignees{/user}","branches_url":"https://api.github.com/repos/Cadair/opsdroid/branches{/branch}","tags_url":"https://api.github.com/repos/Cadair/opsdroid/tags","blobs_url":"https://api.github.com/repos/Cadair/opsdroid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Cadair/opsdroid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Cadair/opsdroid/git/refs{/sha}","trees_url":"https://api.github.com/repos/Cadair/opsdroid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Cadair/opsdroid/statuses/{sha}","languages_url":"https://api.github.com/repos/Cadair/opsdroid/languages","stargazers_url":"https://api.github.com/repos/Cadair/opsdroid/stargazers","contributors_url":"https://api.github.com/repos/Cadair/opsdroid/contributors","subscribers_url":"https://api.github.com/repos/Cadair/opsdroid/subscribers","subscription_url":"https://api.github.com/repos/Cadair/opsdroid/subscription","commits_url":"https://api.github.com/repos/Cadair/opsdroid/commits{/sha}","git_commits_url":"https://api.github.com/repos/Cadair/opsdroid/git/commits{/sha}","comments_url":"https://api.github.com/repos/Cadair/opsdroid/comments{/number}","issue_comment_url":"https://api.github.com/repos/Cadair/opsdroid/issues/comments{/number}","contents_url":"https://api.github.com/repos/Cadair/opsdroid/contents/{+path}","compare_url":"https://api.github.com/repos/Cadair/opsdroid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Cadair/opsdroid/merges","archive_url":"https://api.github.com/repos/Cadair/opsdroid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Cadair/opsdroid/downloads","issues_url":"https://api.github.com/repos/Cadair/opsdroid/issues{/number}","pulls_url":"https://api.github.com/repos/Cadair/opsdroid/pulls{/number}","milestones_url":"https://api.github.com/repos/Cadair/opsdroid/milestones{/number}","notifications_url":"https://api.github.com/repos/Cadair/opsdroid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Cadair/opsdroid/labels{/name}","releases_url":"https://api.github.com/repos/Cadair/opsdroid/releases{/id}","deployments_url":"https://api.github.com/repos/Cadair/opsdroid/deployments","created_at":"2017-10-19T16:16:09Z","updated_at":"2017-10-19T16:16:10Z","pushed_at":"2017-10-19T16:42:32Z","git_url":"git://github.com/Cadair/opsdroid.git","ssh_url":"git@github.com:Cadair/opsdroid.git","clone_url":"https://github.com/Cadair/opsdroid.git","svn_url":"https://github.com/Cadair/opsdroid","homepage":"https://opsdroid.github.io","size":223,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"opsdroid:master","ref":"master","sha":"765c8ec950ce0f85fd878362d28cd9f44fc0ae88","user":{"login":"opsdroid","id":20677702,"avatar_url":"https://avatars2.githubusercontent.com/u/20677702?v=4","gravatar_id":"","url":"https://api.github.com/users/opsdroid","html_url":"https://github.com/opsdroid","followers_url":"https://api.github.com/users/opsdroid/followers","following_url":"https://api.github.com/users/opsdroid/following{/other_user}","gists_url":"https://api.github.com/users/opsdroid/gists{/gist_id}","starred_url":"https://api.github.com/users/opsdroid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opsdroid/subscriptions","organizations_url":"https://api.github.com/users/opsdroid/orgs","repos_url":"https://api.github.com/users/opsdroid/repos","events_url":"https://api.github.com/users/opsdroid/events{/privacy}","received_events_url":"https://api.github.com/users/opsdroid/received_events","type":"Organization","site_admin":false},"repo":{"id":64034523,"name":"opsdroid","full_name":"opsdroid/opsdroid","owner":{"login":"opsdroid","id":20677702,"avatar_url":"https://avatars2.githubusercontent.com/u/20677702?v=4","gravatar_id":"","url":"https://api.github.com/users/opsdroid","html_url":"https://github.com/opsdroid","followers_url":"https://api.github.com/users/opsdroid/followers","following_url":"https://api.github.com/users/opsdroid/following{/other_user}","gists_url":"https://api.github.com/users/opsdroid/gists{/gist_id}","starred_url":"https://api.github.com/users/opsdroid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opsdroid/subscriptions","organizations_url":"https://api.github.com/users/opsdroid/orgs","repos_url":"https://api.github.com/users/opsdroid/repos","events_url":"https://api.github.com/users/opsdroid/events{/privacy}","received_events_url":"https://api.github.com/users/opsdroid/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opsdroid/opsdroid","description":"🤖 An open source chat-ops bot framework","fork":false,"url":"https://api.github.com/repos/opsdroid/opsdroid","forks_url":"https://api.github.com/repos/opsdroid/opsdroid/forks","keys_url":"https://api.github.com/repos/opsdroid/opsdroid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opsdroid/opsdroid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opsdroid/opsdroid/teams","hooks_url":"https://api.github.com/repos/opsdroid/opsdroid/hooks","issue_events_url":"https://api.github.com/repos/opsdroid/opsdroid/issues/events{/number}","events_url":"https://api.github.com/repos/opsdroid/opsdroid/events","assignees_url":"https://api.github.com/repos/opsdroid/opsdroid/assignees{/user}","branches_url":"https://api.github.com/repos/opsdroid/opsdroid/branches{/branch}","tags_url":"https://api.github.com/repos/opsdroid/opsdroid/tags","blobs_url":"https://api.github.com/repos/opsdroid/opsdroid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opsdroid/opsdroid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opsdroid/opsdroid/git/refs{/sha}","trees_url":"https://api.github.com/repos/opsdroid/opsdroid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opsdroid/opsdroid/statuses/{sha}","languages_url":"https://api.github.com/repos/opsdroid/opsdroid/languages","stargazers_url":"https://api.github.com/repos/opsdroid/opsdroid/stargazers","contributors_url":"https://api.github.com/repos/opsdroid/opsdroid/contributors","subscribers_url":"https://api.github.com/repos/opsdroid/opsdroid/subscribers","subscription_url":"https://api.github.com/repos/opsdroid/opsdroid/subscription","commits_url":"https://api.github.com/repos/opsdroid/opsdroid/commits{/sha}","git_commits_url":"https://api.github.com/repos/opsdroid/opsdroid/git/commits{/sha}","comments_url":"https://api.github.com/repos/opsdroid/opsdroid/comments{/number}","issue_comment_url":"https://api.github.com/repos/opsdroid/opsdroid/issues/comments{/number}","contents_url":"https://api.github.com/repos/opsdroid/opsdroid/contents/{+path}","compare_url":"https://api.github.com/repos/opsdroid/opsdroid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opsdroid/opsdroid/merges","archive_url":"https://api.github.com/repos/opsdroid/opsdroid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opsdroid/opsdroid/downloads","issues_url":"https://api.github.com/repos/opsdroid/opsdroid/issues{/number}","pulls_url":"https://api.github.com/repos/opsdroid/opsdroid/pulls{/number}","milestones_url":"https://api.github.com/repos/opsdroid/opsdroid/milestones{/number}","notifications_url":"https://api.github.com/repos/opsdroid/opsdroid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opsdroid/opsdroid/labels{/name}","releases_url":"https://api.github.com/repos/opsdroid/opsdroid/releases{/id}","deployments_url":"https://api.github.com/repos/opsdroid/opsdroid/deployments","created_at":"2016-07-23T20:18:56Z","updated_at":"2017-10-12T08:30:16Z","pushed_at":"2017-10-19T18:30:16Z","git_url":"git://github.com/opsdroid/opsdroid.git","ssh_url":"git@github.com:opsdroid/opsdroid.git","clone_url":"https://github.com/opsdroid/opsdroid.git","svn_url":"https://github.com/opsdroid/opsdroid","homepage":"https://opsdroid.github.io","size":222,"stargazers_count":57,"watchers_count":57,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":40,"forks":23,"open_issues":40,"watchers":57,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opsdroid/opsdroid/pulls/276"},"html":{"href":"https://github.com/opsdroid/opsdroid/pull/276"},"issue":{"href":"https://api.github.com/repos/opsdroid/opsdroid/issues/276"},"comments":{"href":"https://api.github.com/repos/opsdroid/opsdroid/issues/276/comments"},"review_comments":{"href":"https://api.github.com/repos/opsdroid/opsdroid/pulls/276/comments"},"review_comment":{"href":"https://api.github.com/repos/opsdroid/opsdroid/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opsdroid/opsdroid/pulls/276/commits"},"statuses":{"href":"https://api.github.com/repos/opsdroid/opsdroid/statuses/bf8ae0f5ff44ba089adcc517545754f068940559"}},"author_association":"NONE"}}
{"actor":{"display_login":"jacobtomlinson"}}