{"action":"created","comment":{"url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/pulls/comments/52305289","id":52305289,"diff_hunk":"@@ -65,6 +76,7 @@ def refresh\n     def refresh_command_buffer\n       @logger.debug(\"command #{@command} got new output: #{@command_buffer.inspect}\")\n       command_update = CommandUpdate.new(@command_buffer)\n+      check_expecting_disconnect","path":"lib/smart_proxy_remote_execution_ssh/session.rb","position":29,"original_position":29,"commit_id":"43f2503c99c32b4e487c528841b82df23eb20aad","original_commit_id":"43f2503c99c32b4e487c528841b82df23eb20aad","user":{"login":"iNecas","id":190443,"avatar_url":"https://avatars.githubusercontent.com/u/190443?v=3","gravatar_id":"","url":"https://api.github.com/users/iNecas","html_url":"https://github.com/iNecas","followers_url":"https://api.github.com/users/iNecas/followers","following_url":"https://api.github.com/users/iNecas/following{/other_user}","gists_url":"https://api.github.com/users/iNecas/gists{/gist_id}","starred_url":"https://api.github.com/users/iNecas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iNecas/subscriptions","organizations_url":"https://api.github.com/users/iNecas/orgs","repos_url":"https://api.github.com/users/iNecas/repos","events_url":"https://api.github.com/users/iNecas/events{/privacy}","received_events_url":"https://api.github.com/users/iNecas/received_events","type":"User","site_admin":false},"body":"We need to determine, if the disconnection was expected (such as when calling `reboot`) or it was an error. We need to do it on two places, because the `@command_buffer` could be filled in this, or previous iteration.","created_at":"2016-02-09T13:15:31Z","updated_at":"2016-02-09T13:15:31Z","html_url":"https://github.com/theforeman/smart_proxy_remote_execution_ssh/pull/20#discussion_r52305289","pull_request_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/pulls/20","_links":{"self":{"href":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/pulls/comments/52305289"},"html":{"href":"https://github.com/theforeman/smart_proxy_remote_execution_ssh/pull/20#discussion_r52305289"},"pull_request":{"href":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/pulls/20","id":57784754,"html_url":"https://github.com/theforeman/smart_proxy_remote_execution_ssh/pull/20","diff_url":"https://github.com/theforeman/smart_proxy_remote_execution_ssh/pull/20.diff","patch_url":"https://github.com/theforeman/smart_proxy_remote_execution_ssh/pull/20.patch","issue_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/issues/20","number":20,"state":"open","locked":false,"title":"Fixes #13491 - handle ssh disconnection","user":{"login":"iNecas","id":190443,"avatar_url":"https://avatars.githubusercontent.com/u/190443?v=3","gravatar_id":"","url":"https://api.github.com/users/iNecas","html_url":"https://github.com/iNecas","followers_url":"https://api.github.com/users/iNecas/followers","following_url":"https://api.github.com/users/iNecas/following{/other_user}","gists_url":"https://api.github.com/users/iNecas/gists{/gist_id}","starred_url":"https://api.github.com/users/iNecas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iNecas/subscriptions","organizations_url":"https://api.github.com/users/iNecas/orgs","repos_url":"https://api.github.com/users/iNecas/repos","events_url":"https://api.github.com/users/iNecas/events{/privacy}","received_events_url":"https://api.github.com/users/iNecas/received_events","type":"User","site_admin":false},"body":"For example, when rebooting as part for the script.","created_at":"2016-01-31T23:39:27Z","updated_at":"2016-02-09T13:15:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2a50bd6bc4f2e21595f1a95f136c684538f6cb29","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/pulls/20/commits","review_comments_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/pulls/20/comments","review_comment_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/pulls/comments{/number}","comments_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/issues/20/comments","statuses_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/statuses/43f2503c99c32b4e487c528841b82df23eb20aad","head":{"label":"iNecas:handle-disconnect","ref":"handle-disconnect","sha":"43f2503c99c32b4e487c528841b82df23eb20aad","user":{"login":"iNecas","id":190443,"avatar_url":"https://avatars.githubusercontent.com/u/190443?v=3","gravatar_id":"","url":"https://api.github.com/users/iNecas","html_url":"https://github.com/iNecas","followers_url":"https://api.github.com/users/iNecas/followers","following_url":"https://api.github.com/users/iNecas/following{/other_user}","gists_url":"https://api.github.com/users/iNecas/gists{/gist_id}","starred_url":"https://api.github.com/users/iNecas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iNecas/subscriptions","organizations_url":"https://api.github.com/users/iNecas/orgs","repos_url":"https://api.github.com/users/iNecas/repos","events_url":"https://api.github.com/users/iNecas/events{/privacy}","received_events_url":"https://api.github.com/users/iNecas/received_events","type":"User","site_admin":false},"repo":{"id":39207440,"name":"smart_proxy_remote_execution_ssh","full_name":"iNecas/smart_proxy_remote_execution_ssh","owner":{"login":"iNecas","id":190443,"avatar_url":"https://avatars.githubusercontent.com/u/190443?v=3","gravatar_id":"","url":"https://api.github.com/users/iNecas","html_url":"https://github.com/iNecas","followers_url":"https://api.github.com/users/iNecas/followers","following_url":"https://api.github.com/users/iNecas/following{/other_user}","gists_url":"https://api.github.com/users/iNecas/gists{/gist_id}","starred_url":"https://api.github.com/users/iNecas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iNecas/subscriptions","organizations_url":"https://api.github.com/users/iNecas/orgs","repos_url":"https://api.github.com/users/iNecas/repos","events_url":"https://api.github.com/users/iNecas/events{/privacy}","received_events_url":"https://api.github.com/users/iNecas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iNecas/smart_proxy_remote_execution_ssh","description":"SSH remote execution provider for Foreman smart proxy","fork":true,"url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh","forks_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/forks","keys_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/teams","hooks_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/hooks","issue_events_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/issues/events{/number}","events_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/events","assignees_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/assignees{/user}","branches_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/branches{/branch}","tags_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/tags","blobs_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/git/refs{/sha}","trees_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/statuses/{sha}","languages_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/languages","stargazers_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/stargazers","contributors_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/contributors","subscribers_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/subscribers","subscription_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/subscription","commits_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/commits{/sha}","git_commits_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/git/commits{/sha}","comments_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/comments{/number}","issue_comment_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/issues/comments{/number}","contents_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/contents/{+path}","compare_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/merges","archive_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/downloads","issues_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/issues{/number}","pulls_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/pulls{/number}","milestones_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/milestones{/number}","notifications_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/labels{/name}","releases_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/releases{/id}","deployments_url":"https://api.github.com/repos/iNecas/smart_proxy_remote_execution_ssh/deployments","created_at":"2015-07-16T16:14:30Z","updated_at":"2015-07-15T13:23:11Z","pushed_at":"2016-02-02T15:43:13Z","git_url":"git://github.com/iNecas/smart_proxy_remote_execution_ssh.git","ssh_url":"git@github.com:iNecas/smart_proxy_remote_execution_ssh.git","clone_url":"https://github.com/iNecas/smart_proxy_remote_execution_ssh.git","svn_url":"https://github.com/iNecas/smart_proxy_remote_execution_ssh","homepage":null,"size":90,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"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":"theforeman:master","ref":"master","sha":"5ef6254deea065be10a436af3cabb3fc9a027a3a","user":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"repo":{"id":39138075,"name":"smart_proxy_remote_execution_ssh","full_name":"theforeman/smart_proxy_remote_execution_ssh","owner":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/theforeman/smart_proxy_remote_execution_ssh","description":"SSH remote execution provider for Foreman smart proxy","fork":false,"url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh","forks_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/forks","keys_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/teams","hooks_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/hooks","issue_events_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/issues/events{/number}","events_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/events","assignees_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/assignees{/user}","branches_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/branches{/branch}","tags_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/tags","blobs_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/git/refs{/sha}","trees_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/statuses/{sha}","languages_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/languages","stargazers_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/stargazers","contributors_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/contributors","subscribers_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/subscribers","subscription_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/subscription","commits_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/commits{/sha}","git_commits_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/git/commits{/sha}","comments_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/comments{/number}","issue_comment_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/issues/comments{/number}","contents_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/contents/{+path}","compare_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/merges","archive_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/downloads","issues_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/issues{/number}","pulls_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/pulls{/number}","milestones_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/milestones{/number}","notifications_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/labels{/name}","releases_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/releases{/id}","deployments_url":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/deployments","created_at":"2015-07-15T13:23:11Z","updated_at":"2016-01-21T17:01:40Z","pushed_at":"2016-02-09T13:13:26Z","git_url":"git://github.com/theforeman/smart_proxy_remote_execution_ssh.git","ssh_url":"git@github.com:theforeman/smart_proxy_remote_execution_ssh.git","clone_url":"https://github.com/theforeman/smart_proxy_remote_execution_ssh.git","svn_url":"https://github.com/theforeman/smart_proxy_remote_execution_ssh","homepage":null,"size":85,"stargazers_count":5,"watchers_count":5,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":1,"forks":7,"open_issues":1,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/pulls/20"},"html":{"href":"https://github.com/theforeman/smart_proxy_remote_execution_ssh/pull/20"},"issue":{"href":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/issues/20"},"comments":{"href":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/theforeman/smart_proxy_remote_execution_ssh/statuses/43f2503c99c32b4e487c528841b82df23eb20aad"}}}}