{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/pulls/comments/139538015","pull_request_review_id":63485236,"id":139538015,"diff_hunk":"@@ -135,6 +88,280 @@ export class Amqp {\n         forever: false\n       }\n     }, amqp10.Policy.EventHub));\n+\n+    this._fsm = new machina.Fsm({\n+      namespace: sdkVersionString,\n+      initialState: 'disconnected',\n+      states: {\n+        disconnected: {\n+          _onEnter: (disconnectCallback, err, result) => {\n+            if (err) {\n+              this._safeCallback(disconnectCallback, err);\n+            } else {\n+              this._safeCallback(disconnectCallback, null, new results.Disconnected());\n+            }\n+          },\n+          amqpError: (err, callback) => { callback(); }, // we're already considering ourselves disconnected. it'd be a bug though?","path":"common/transport/amqp/src/amqp.ts","position":122,"original_position":122,"commit_id":"fb095e1e56a19f4d66db627f8890307511081c9f","original_commit_id":"fb095e1e56a19f4d66db627f8890307511081c9f","user":{"login":"pierreca","id":4979572,"avatar_url":"https://avatars2.githubusercontent.com/u/4979572?v=4","gravatar_id":"","url":"https://api.github.com/users/pierreca","html_url":"https://github.com/pierreca","followers_url":"https://api.github.com/users/pierreca/followers","following_url":"https://api.github.com/users/pierreca/following{/other_user}","gists_url":"https://api.github.com/users/pierreca/gists{/gist_id}","starred_url":"https://api.github.com/users/pierreca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierreca/subscriptions","organizations_url":"https://api.github.com/users/pierreca/orgs","repos_url":"https://api.github.com/users/pierreca/repos","events_url":"https://api.github.com/users/pierreca/events{/privacy}","received_events_url":"https://api.github.com/users/pierreca/received_events","type":"User","site_admin":false},"body":"yup, I don't want to crash though, but I'll add a debug log line\r\n\r\n---\r\nIn reply to: [139507770](https://github.com/Azure/azure-iot-sdk-node/pull/83#discussion_r139507770) [](ancestors = 139507770)","created_at":"2017-09-18T20:55:51Z","updated_at":"2017-09-18T20:55:51Z","html_url":"https://github.com/Azure/azure-iot-sdk-node/pull/83#discussion_r139538015","pull_request_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/pulls/83","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-iot-sdk-node/pulls/comments/139538015"},"html":{"href":"https://github.com/Azure/azure-iot-sdk-node/pull/83#discussion_r139538015"},"pull_request":{"href":"https://api.github.com/repos/Azure/azure-iot-sdk-node/pulls/83"}},"in_reply_to_id":139507770},"pull_request":{"url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/pulls/83","id":141429305,"html_url":"https://github.com/Azure/azure-iot-sdk-node/pull/83","diff_url":"https://github.com/Azure/azure-iot-sdk-node/pull/83.diff","patch_url":"https://github.com/Azure/azure-iot-sdk-node/pull/83.patch","issue_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/issues/83","number":83,"state":"open","locked":false,"title":"State machines for amqp base package","user":{"login":"pierreca","id":4979572,"avatar_url":"https://avatars2.githubusercontent.com/u/4979572?v=4","gravatar_id":"","url":"https://api.github.com/users/pierreca","html_url":"https://github.com/pierreca","followers_url":"https://api.github.com/users/pierreca/followers","following_url":"https://api.github.com/users/pierreca/following{/other_user}","gists_url":"https://api.github.com/users/pierreca/gists{/gist_id}","starred_url":"https://api.github.com/users/pierreca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierreca/subscriptions","organizations_url":"https://api.github.com/users/pierreca/orgs","repos_url":"https://api.github.com/users/pierreca/repos","events_url":"https://api.github.com/users/pierreca/events{/privacy}","received_events_url":"https://api.github.com/users/pierreca/received_events","type":"User","site_admin":false},"body":"Introduce state machines for the base AMQP layer. greatly increases connection stability and another step towards automated retries.","created_at":"2017-09-16T02:37:21Z","updated_at":"2017-09-18T20:55:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd4812c27abeb33fde4c10c37e7825fd01a8db54","assignee":{"login":"pierreca","id":4979572,"avatar_url":"https://avatars2.githubusercontent.com/u/4979572?v=4","gravatar_id":"","url":"https://api.github.com/users/pierreca","html_url":"https://github.com/pierreca","followers_url":"https://api.github.com/users/pierreca/followers","following_url":"https://api.github.com/users/pierreca/following{/other_user}","gists_url":"https://api.github.com/users/pierreca/gists{/gist_id}","starred_url":"https://api.github.com/users/pierreca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierreca/subscriptions","organizations_url":"https://api.github.com/users/pierreca/orgs","repos_url":"https://api.github.com/users/pierreca/repos","events_url":"https://api.github.com/users/pierreca/events{/privacy}","received_events_url":"https://api.github.com/users/pierreca/received_events","type":"User","site_admin":false},"assignees":[{"login":"pierreca","id":4979572,"avatar_url":"https://avatars2.githubusercontent.com/u/4979572?v=4","gravatar_id":"","url":"https://api.github.com/users/pierreca","html_url":"https://github.com/pierreca","followers_url":"https://api.github.com/users/pierreca/followers","following_url":"https://api.github.com/users/pierreca/following{/other_user}","gists_url":"https://api.github.com/users/pierreca/gists{/gist_id}","starred_url":"https://api.github.com/users/pierreca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierreca/subscriptions","organizations_url":"https://api.github.com/users/pierreca/orgs","repos_url":"https://api.github.com/users/pierreca/repos","events_url":"https://api.github.com/users/pierreca/events{/privacy}","received_events_url":"https://api.github.com/users/pierreca/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"avranju","id":628128,"avatar_url":"https://avatars1.githubusercontent.com/u/628128?v=4","gravatar_id":"","url":"https://api.github.com/users/avranju","html_url":"https://github.com/avranju","followers_url":"https://api.github.com/users/avranju/followers","following_url":"https://api.github.com/users/avranju/following{/other_user}","gists_url":"https://api.github.com/users/avranju/gists{/gist_id}","starred_url":"https://api.github.com/users/avranju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avranju/subscriptions","organizations_url":"https://api.github.com/users/avranju/orgs","repos_url":"https://api.github.com/users/avranju/repos","events_url":"https://api.github.com/users/avranju/events{/privacy}","received_events_url":"https://api.github.com/users/avranju/received_events","type":"User","site_admin":false},{"login":"anthonyvercolano","id":9854568,"avatar_url":"https://avatars0.githubusercontent.com/u/9854568?v=4","gravatar_id":"","url":"https://api.github.com/users/anthonyvercolano","html_url":"https://github.com/anthonyvercolano","followers_url":"https://api.github.com/users/anthonyvercolano/followers","following_url":"https://api.github.com/users/anthonyvercolano/following{/other_user}","gists_url":"https://api.github.com/users/anthonyvercolano/gists{/gist_id}","starred_url":"https://api.github.com/users/anthonyvercolano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anthonyvercolano/subscriptions","organizations_url":"https://api.github.com/users/anthonyvercolano/orgs","repos_url":"https://api.github.com/users/anthonyvercolano/repos","events_url":"https://api.github.com/users/anthonyvercolano/events{/privacy}","received_events_url":"https://api.github.com/users/anthonyvercolano/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/pulls/83/commits","review_comments_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/pulls/83/comments","review_comment_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/issues/83/comments","statuses_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/statuses/fb095e1e56a19f4d66db627f8890307511081c9f","head":{"label":"Azure:amqp-base-fsms","ref":"amqp-base-fsms","sha":"fb095e1e56a19f4d66db627f8890307511081c9f","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":70935002,"name":"azure-iot-sdk-node","full_name":"Azure/azure-iot-sdk-node","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/azure-iot-sdk-node","description":"A Node.js SDK for connecting devices to Microsoft Azure IoT services","fork":false,"url":"https://api.github.com/repos/Azure/azure-iot-sdk-node","forks_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/forks","keys_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/teams","hooks_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/events","assignees_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/tags","blobs_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/subscription","commits_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/merges","archive_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/downloads","issues_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/deployments","created_at":"2016-10-14T18:03:43Z","updated_at":"2017-09-01T18:03:11Z","pushed_at":"2017-09-18T19:00:36Z","git_url":"git://github.com/Azure/azure-iot-sdk-node.git","ssh_url":"git@github.com:Azure/azure-iot-sdk-node.git","clone_url":"https://github.com/Azure/azure-iot-sdk-node.git","svn_url":"https://github.com/Azure/azure-iot-sdk-node","homepage":"https://azure.github.io/azure-iot-sdk-node/","size":42312,"stargazers_count":57,"watchers_count":57,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":44,"mirror_url":null,"open_issues_count":15,"forks":44,"open_issues":15,"watchers":57,"default_branch":"master"}},"base":{"label":"Azure:master","ref":"master","sha":"0465b2661afd5e06c73b3a0324ef42d74aa3adcc","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":70935002,"name":"azure-iot-sdk-node","full_name":"Azure/azure-iot-sdk-node","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/azure-iot-sdk-node","description":"A Node.js SDK for connecting devices to Microsoft Azure IoT services","fork":false,"url":"https://api.github.com/repos/Azure/azure-iot-sdk-node","forks_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/forks","keys_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/teams","hooks_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/events","assignees_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/tags","blobs_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/subscription","commits_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/merges","archive_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/downloads","issues_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/azure-iot-sdk-node/deployments","created_at":"2016-10-14T18:03:43Z","updated_at":"2017-09-01T18:03:11Z","pushed_at":"2017-09-18T19:00:36Z","git_url":"git://github.com/Azure/azure-iot-sdk-node.git","ssh_url":"git@github.com:Azure/azure-iot-sdk-node.git","clone_url":"https://github.com/Azure/azure-iot-sdk-node.git","svn_url":"https://github.com/Azure/azure-iot-sdk-node","homepage":"https://azure.github.io/azure-iot-sdk-node/","size":42312,"stargazers_count":57,"watchers_count":57,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":44,"mirror_url":null,"open_issues_count":15,"forks":44,"open_issues":15,"watchers":57,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-iot-sdk-node/pulls/83"},"html":{"href":"https://github.com/Azure/azure-iot-sdk-node/pull/83"},"issue":{"href":"https://api.github.com/repos/Azure/azure-iot-sdk-node/issues/83"},"comments":{"href":"https://api.github.com/repos/Azure/azure-iot-sdk-node/issues/83/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/azure-iot-sdk-node/pulls/83/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/azure-iot-sdk-node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/azure-iot-sdk-node/pulls/83/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/azure-iot-sdk-node/statuses/fb095e1e56a19f4d66db627f8890307511081c9f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"pierreca"}}