{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/azure-iot-sdks/pulls/comments/76849877","id":76849877,"diff_hunk":"@@ -528,7 +563,11 @@ private Future startReactorAsync() throws IOException\n \n         executorService = Executors.newFixedThreadPool(1);\n         ReactorRunner reactorRunner = new ReactorRunner(iotHubReactor);\n-        return executorService.submit(reactorRunner);\n+        ReactorRunnerCount++;","path":"java/device/iothub-java-client/src/main/java/com/microsoft/azure/iothub/transport/amqps/AmqpsIotHubConnection.java","position":106,"original_position":106,"commit_id":"c70436f52dfb0fda0fa36434b14b0f4bf7311c13","original_commit_id":"c70436f52dfb0fda0fa36434b14b0f4bf7311c13","user":{"login":"prmathur-microsoft","id":20328314,"avatar_url":"https://avatars.githubusercontent.com/u/20328314?v=3","gravatar_id":"","url":"https://api.github.com/users/prmathur-microsoft","html_url":"https://github.com/prmathur-microsoft","followers_url":"https://api.github.com/users/prmathur-microsoft/followers","following_url":"https://api.github.com/users/prmathur-microsoft/following{/other_user}","gists_url":"https://api.github.com/users/prmathur-microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/prmathur-microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prmathur-microsoft/subscriptions","organizations_url":"https://api.github.com/users/prmathur-microsoft/orgs","repos_url":"https://api.github.com/users/prmathur-microsoft/repos","events_url":"https://api.github.com/users/prmathur-microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/prmathur-microsoft/received_events","type":"User","site_admin":false},"body":"I believe we wouldn't need it if you decide to remove this variable.","created_at":"2016-08-30T18:16:28Z","updated_at":"2016-08-30T18:16:28Z","html_url":"https://github.com/Azure/azure-iot-sdks/pull/790#discussion_r76849877","pull_request_url":"https://api.github.com/repos/Azure/azure-iot-sdks/pulls/790","_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-iot-sdks/pulls/comments/76849877"},"html":{"href":"https://github.com/Azure/azure-iot-sdks/pull/790#discussion_r76849877"},"pull_request":{"href":"https://api.github.com/repos/Azure/azure-iot-sdks/pulls/790"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/azure-iot-sdks/pulls/790","id":83244272,"html_url":"https://github.com/Azure/azure-iot-sdks/pull/790","diff_url":"https://github.com/Azure/azure-iot-sdks/pull/790.diff","patch_url":"https://github.com/Azure/azure-iot-sdks/pull/790.patch","issue_url":"https://api.github.com/repos/Azure/azure-iot-sdks/issues/790","number":790,"state":"open","locked":false,"title":"Iot hub java memory leak","user":{"login":"kevinledinh","id":20555615,"avatar_url":"https://avatars.githubusercontent.com/u/20555615?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinledinh","html_url":"https://github.com/kevinledinh","followers_url":"https://api.github.com/users/kevinledinh/followers","following_url":"https://api.github.com/users/kevinledinh/following{/other_user}","gists_url":"https://api.github.com/users/kevinledinh/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinledinh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinledinh/subscriptions","organizations_url":"https://api.github.com/users/kevinledinh/orgs","repos_url":"https://api.github.com/users/kevinledinh/repos","events_url":"https://api.github.com/users/kevinledinh/events{/privacy}","received_events_url":"https://api.github.com/users/kevinledinh/received_events","type":"User","site_admin":false},"body":"Memory leak fix for IoT Hub Device Client Java implementation as per discussion in ticket 720 and with Microsoft Engineer Priyanka Mathur on 26th Aug 2016:\r\n\"\r\n\r\nIn IotHubReactor.java, only checking if the current Thread is interrupted is not sufficient because, from what I understand, a Thread can sometimes ignores the interrupt signal. Also, cancelling future task by reactorFuture.cancel (in AmpqIotHubConnection.java , close() ) is also not sufficient. All these methods are attempts to close a running Thread, and the Thread can (most of the time) ignore the request. \r\n\r\nSo there is a need to manually check whether the Future object is cancelled while the thread is running. I've added futureReactor.isCancelled() in run() method of IotHubReactor class to exit the thread accordingly. Also, I've used break instead of return to call reactor.stop() method before exiting run().\r\n\r\nPlease let me know if this fix is valid on your set up and whether it will be included in the next release of the IoT Hub SDK.\r\n\"\r\n\r\nI am looking forward to hearing from the IoT Hub Team.\r\n\r\nBest wishes,","created_at":"2016-08-30T10:16:31Z","updated_at":"2016-08-30T18:16:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"639b9eccbe22157e34766c3e747c97e29c30dd5b","assignee":{"login":"prmathur-microsoft","id":20328314,"avatar_url":"https://avatars.githubusercontent.com/u/20328314?v=3","gravatar_id":"","url":"https://api.github.com/users/prmathur-microsoft","html_url":"https://github.com/prmathur-microsoft","followers_url":"https://api.github.com/users/prmathur-microsoft/followers","following_url":"https://api.github.com/users/prmathur-microsoft/following{/other_user}","gists_url":"https://api.github.com/users/prmathur-microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/prmathur-microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prmathur-microsoft/subscriptions","organizations_url":"https://api.github.com/users/prmathur-microsoft/orgs","repos_url":"https://api.github.com/users/prmathur-microsoft/repos","events_url":"https://api.github.com/users/prmathur-microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/prmathur-microsoft/received_events","type":"User","site_admin":false},"assignees":[{"login":"prmathur-microsoft","id":20328314,"avatar_url":"https://avatars.githubusercontent.com/u/20328314?v=3","gravatar_id":"","url":"https://api.github.com/users/prmathur-microsoft","html_url":"https://github.com/prmathur-microsoft","followers_url":"https://api.github.com/users/prmathur-microsoft/followers","following_url":"https://api.github.com/users/prmathur-microsoft/following{/other_user}","gists_url":"https://api.github.com/users/prmathur-microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/prmathur-microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prmathur-microsoft/subscriptions","organizations_url":"https://api.github.com/users/prmathur-microsoft/orgs","repos_url":"https://api.github.com/users/prmathur-microsoft/repos","events_url":"https://api.github.com/users/prmathur-microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/prmathur-microsoft/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Azure/azure-iot-sdks/pulls/790/commits","review_comments_url":"https://api.github.com/repos/Azure/azure-iot-sdks/pulls/790/comments","review_comment_url":"https://api.github.com/repos/Azure/azure-iot-sdks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/azure-iot-sdks/issues/790/comments","statuses_url":"https://api.github.com/repos/Azure/azure-iot-sdks/statuses/c70436f52dfb0fda0fa36434b14b0f4bf7311c13","head":{"label":"kevinledinh:IoTHub-Java-MemoryLeak","ref":"IoTHub-Java-MemoryLeak","sha":"c70436f52dfb0fda0fa36434b14b0f4bf7311c13","user":{"login":"kevinledinh","id":20555615,"avatar_url":"https://avatars.githubusercontent.com/u/20555615?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinledinh","html_url":"https://github.com/kevinledinh","followers_url":"https://api.github.com/users/kevinledinh/followers","following_url":"https://api.github.com/users/kevinledinh/following{/other_user}","gists_url":"https://api.github.com/users/kevinledinh/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinledinh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinledinh/subscriptions","organizations_url":"https://api.github.com/users/kevinledinh/orgs","repos_url":"https://api.github.com/users/kevinledinh/repos","events_url":"https://api.github.com/users/kevinledinh/events{/privacy}","received_events_url":"https://api.github.com/users/kevinledinh/received_events","type":"User","site_admin":false},"repo":{"id":66927906,"name":"azure-iot-sdks","full_name":"kevinledinh/azure-iot-sdks","owner":{"login":"kevinledinh","id":20555615,"avatar_url":"https://avatars.githubusercontent.com/u/20555615?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinledinh","html_url":"https://github.com/kevinledinh","followers_url":"https://api.github.com/users/kevinledinh/followers","following_url":"https://api.github.com/users/kevinledinh/following{/other_user}","gists_url":"https://api.github.com/users/kevinledinh/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinledinh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinledinh/subscriptions","organizations_url":"https://api.github.com/users/kevinledinh/orgs","repos_url":"https://api.github.com/users/kevinledinh/repos","events_url":"https://api.github.com/users/kevinledinh/events{/privacy}","received_events_url":"https://api.github.com/users/kevinledinh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kevinledinh/azure-iot-sdks","description":"SDKs for a variety of languages and platforms that help connect devices to Microsoft Azure IoT services","fork":true,"url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks","forks_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/forks","keys_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/teams","hooks_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/hooks","issue_events_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/issues/events{/number}","events_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/events","assignees_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/assignees{/user}","branches_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/branches{/branch}","tags_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/tags","blobs_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/git/refs{/sha}","trees_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/statuses/{sha}","languages_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/languages","stargazers_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/stargazers","contributors_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/contributors","subscribers_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/subscribers","subscription_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/subscription","commits_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/commits{/sha}","git_commits_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/git/commits{/sha}","comments_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/comments{/number}","issue_comment_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/issues/comments{/number}","contents_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/contents/{+path}","compare_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/merges","archive_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/downloads","issues_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/issues{/number}","pulls_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/pulls{/number}","milestones_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/milestones{/number}","notifications_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/labels{/name}","releases_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/releases{/id}","deployments_url":"https://api.github.com/repos/kevinledinh/azure-iot-sdks/deployments","created_at":"2016-08-30T09:44:42Z","updated_at":"2016-08-30T09:44:48Z","pushed_at":"2016-08-30T10:11:25Z","git_url":"git://github.com/kevinledinh/azure-iot-sdks.git","ssh_url":"git@github.com:kevinledinh/azure-iot-sdks.git","clone_url":"https://github.com/kevinledinh/azure-iot-sdks.git","svn_url":"https://github.com/kevinledinh/azure-iot-sdks","homepage":"http://azure.github.io/azure-iot-sdks/","size":85120,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"Azure:master","ref":"master","sha":"266fc32a12f19996fb130d83116dbdd6c5b66316","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","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":41836441,"name":"azure-iot-sdks","full_name":"Azure/azure-iot-sdks","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","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-sdks","description":"SDKs for a variety of languages and platforms that help connect devices to Microsoft Azure IoT services","fork":false,"url":"https://api.github.com/repos/Azure/azure-iot-sdks","forks_url":"https://api.github.com/repos/Azure/azure-iot-sdks/forks","keys_url":"https://api.github.com/repos/Azure/azure-iot-sdks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-iot-sdks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-iot-sdks/teams","hooks_url":"https://api.github.com/repos/Azure/azure-iot-sdks/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-iot-sdks/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-iot-sdks/events","assignees_url":"https://api.github.com/repos/Azure/azure-iot-sdks/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-iot-sdks/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-iot-sdks/tags","blobs_url":"https://api.github.com/repos/Azure/azure-iot-sdks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-iot-sdks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-iot-sdks/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-iot-sdks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-iot-sdks/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-iot-sdks/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-iot-sdks/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-iot-sdks/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-iot-sdks/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-iot-sdks/subscription","commits_url":"https://api.github.com/repos/Azure/azure-iot-sdks/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-iot-sdks/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-iot-sdks/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-iot-sdks/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-iot-sdks/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-iot-sdks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-iot-sdks/merges","archive_url":"https://api.github.com/repos/Azure/azure-iot-sdks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-iot-sdks/downloads","issues_url":"https://api.github.com/repos/Azure/azure-iot-sdks/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-iot-sdks/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-iot-sdks/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-iot-sdks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-iot-sdks/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-iot-sdks/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/azure-iot-sdks/deployments","created_at":"2015-09-03T01:30:08Z","updated_at":"2016-08-30T13:31:09Z","pushed_at":"2016-08-30T18:12:51Z","git_url":"git://github.com/Azure/azure-iot-sdks.git","ssh_url":"git@github.com:Azure/azure-iot-sdks.git","clone_url":"https://github.com/Azure/azure-iot-sdks.git","svn_url":"https://github.com/Azure/azure-iot-sdks","homepage":"http://azure.github.io/azure-iot-sdks/","size":92499,"stargazers_count":315,"watchers_count":315,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":419,"mirror_url":null,"open_issues_count":89,"forks":419,"open_issues":89,"watchers":315,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-iot-sdks/pulls/790"},"html":{"href":"https://github.com/Azure/azure-iot-sdks/pull/790"},"issue":{"href":"https://api.github.com/repos/Azure/azure-iot-sdks/issues/790"},"comments":{"href":"https://api.github.com/repos/Azure/azure-iot-sdks/issues/790/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/azure-iot-sdks/pulls/790/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/azure-iot-sdks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/azure-iot-sdks/pulls/790/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/azure-iot-sdks/statuses/c70436f52dfb0fda0fa36434b14b0f4bf7311c13"}}}}
{"actor":{"display_login":"prmathur-microsoft"}}