{"action":"created","comment":{"url":"https://api.github.com/repos/lagom/lagom/pulls/comments/204830893","pull_request_review_id":139981634,"id":204830893,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNDgzMDg5Mw==","diff_hunk":"@@ -366,15 +367,22 @@ class NettyServiceGateway(lifecycle: ApplicationLifecycle, config: ServiceGatewa\n   }\n \n   private val bindFuture = server.bind(config.port).channelFutureToScala\n-  lifecycle.addStopHook(() => {\n-    for {\n-      channel <- bindFuture\n-      closed <- channel.close().channelFutureToScala\n-    } yield {\n-      eventLoop.shutdownGracefully(10, 10, TimeUnit.MILLISECONDS)\n-      poolMap.asScala.foreach(_.getValue.close())\n+\n+  coordinatedShutdown.addTask(\n+    CoordinatedShutdown.PhaseServiceUnbind,\n+    \"unbind-netty-service-gateway\"\n+  ) {\n+      () =>\n+        {\n+          (for {\n+            channel <- bindFuture\n+            closed <- channel.close().channelFutureToScala\n+          } yield {\n+            eventLoop.shutdownGracefully(10, 10, TimeUnit.MILLISECONDS)","path":"dev/service-registry/service-locator/src/main/scala/com/lightbend/lagom/gateway/NettyServiceGateway.scala","position":null,"original_position":68,"commit_id":"3ee48110f9a85e5ddc56648158c865318b6deba8","original_commit_id":"f194b588bbb6fc87dc6fb56e3276d4eeb23a50e1","user":{"login":"ignasi35","id":762126,"node_id":"MDQ6VXNlcjc2MjEyNg==","avatar_url":"https://avatars2.githubusercontent.com/u/762126?v=4","gravatar_id":"","url":"https://api.github.com/users/ignasi35","html_url":"https://github.com/ignasi35","followers_url":"https://api.github.com/users/ignasi35/followers","following_url":"https://api.github.com/users/ignasi35/following{/other_user}","gists_url":"https://api.github.com/users/ignasi35/gists{/gist_id}","starred_url":"https://api.github.com/users/ignasi35/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ignasi35/subscriptions","organizations_url":"https://api.github.com/users/ignasi35/orgs","repos_url":"https://api.github.com/users/ignasi35/repos","events_url":"https://api.github.com/users/ignasi35/events{/privacy}","received_events_url":"https://api.github.com/users/ignasi35/received_events","type":"User","site_admin":false},"body":"After reviewing the Netty implementation and how we use it I think https://github.com/playframework/playframework/blob/61c6f90d7b0c20040d58fbf3e746b7373fdac8fa/framework/src/play-netty-server/src/main/scala/play/core/server/NettyServer.scala#L255-L263 could be better (see the implementation I used here).","created_at":"2018-07-24T16:47:15Z","updated_at":"2018-07-24T16:47:15Z","html_url":"https://github.com/lagom/lagom/pull/1483#discussion_r204830893","pull_request_url":"https://api.github.com/repos/lagom/lagom/pulls/1483","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/lagom/lagom/pulls/comments/204830893"},"html":{"href":"https://github.com/lagom/lagom/pull/1483#discussion_r204830893"},"pull_request":{"href":"https://api.github.com/repos/lagom/lagom/pulls/1483"}},"in_reply_to_id":204750950},"pull_request":{"url":"https://api.github.com/repos/lagom/lagom/pulls/1483","id":203515489,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzNTE1NDg5","html_url":"https://github.com/lagom/lagom/pull/1483","diff_url":"https://github.com/lagom/lagom/pull/1483.diff","patch_url":"https://github.com/lagom/lagom/pull/1483.patch","issue_url":"https://api.github.com/repos/lagom/lagom/issues/1483","number":1483,"state":"open","locked":false,"title":"Extends the usage of CS in Lagom-core (mostly dev mode)","user":{"login":"ignasi35","id":762126,"node_id":"MDQ6VXNlcjc2MjEyNg==","avatar_url":"https://avatars2.githubusercontent.com/u/762126?v=4","gravatar_id":"","url":"https://api.github.com/users/ignasi35","html_url":"https://github.com/ignasi35","followers_url":"https://api.github.com/users/ignasi35/followers","following_url":"https://api.github.com/users/ignasi35/following{/other_user}","gists_url":"https://api.github.com/users/ignasi35/gists{/gist_id}","starred_url":"https://api.github.com/users/ignasi35/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ignasi35/subscriptions","organizations_url":"https://api.github.com/users/ignasi35/orgs","repos_url":"https://api.github.com/users/ignasi35/repos","events_url":"https://api.github.com/users/ignasi35/events{/privacy}","received_events_url":"https://api.github.com/users/ignasi35/received_events","type":"User","site_admin":false},"body":"I had worked on this few weeks ago but needed CS merged and 2.7.0-Mx. \r\n\r\nIts' mostly dogfooding so devmode components use Coordinated Shutdown instead of `ApplicationLifecycle`.\r\n\r\nRelated to #1379","created_at":"2018-07-24T12:50:05Z","updated_at":"2018-07-24T16:47:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"16dadd5007db49161f79ebd158315365a5dec8b4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/lagom/lagom/pulls/1483/commits","review_comments_url":"https://api.github.com/repos/lagom/lagom/pulls/1483/comments","review_comment_url":"https://api.github.com/repos/lagom/lagom/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lagom/lagom/issues/1483/comments","statuses_url":"https://api.github.com/repos/lagom/lagom/statuses/3ee48110f9a85e5ddc56648158c865318b6deba8","head":{"label":"ignasi35:1379-use-CS-in-lagom-core","ref":"1379-use-CS-in-lagom-core","sha":"3ee48110f9a85e5ddc56648158c865318b6deba8","user":{"login":"ignasi35","id":762126,"node_id":"MDQ6VXNlcjc2MjEyNg==","avatar_url":"https://avatars2.githubusercontent.com/u/762126?v=4","gravatar_id":"","url":"https://api.github.com/users/ignasi35","html_url":"https://github.com/ignasi35","followers_url":"https://api.github.com/users/ignasi35/followers","following_url":"https://api.github.com/users/ignasi35/following{/other_user}","gists_url":"https://api.github.com/users/ignasi35/gists{/gist_id}","starred_url":"https://api.github.com/users/ignasi35/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ignasi35/subscriptions","organizations_url":"https://api.github.com/users/ignasi35/orgs","repos_url":"https://api.github.com/users/ignasi35/repos","events_url":"https://api.github.com/users/ignasi35/events{/privacy}","received_events_url":"https://api.github.com/users/ignasi35/received_events","type":"User","site_admin":false},"repo":{"id":72645230,"node_id":"MDEwOlJlcG9zaXRvcnk3MjY0NTIzMA==","name":"lagom","full_name":"ignasi35/lagom","owner":{"login":"ignasi35","id":762126,"node_id":"MDQ6VXNlcjc2MjEyNg==","avatar_url":"https://avatars2.githubusercontent.com/u/762126?v=4","gravatar_id":"","url":"https://api.github.com/users/ignasi35","html_url":"https://github.com/ignasi35","followers_url":"https://api.github.com/users/ignasi35/followers","following_url":"https://api.github.com/users/ignasi35/following{/other_user}","gists_url":"https://api.github.com/users/ignasi35/gists{/gist_id}","starred_url":"https://api.github.com/users/ignasi35/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ignasi35/subscriptions","organizations_url":"https://api.github.com/users/ignasi35/orgs","repos_url":"https://api.github.com/users/ignasi35/repos","events_url":"https://api.github.com/users/ignasi35/events{/privacy}","received_events_url":"https://api.github.com/users/ignasi35/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ignasi35/lagom","description":"Reactive Microservices for the JVM","fork":true,"url":"https://api.github.com/repos/ignasi35/lagom","forks_url":"https://api.github.com/repos/ignasi35/lagom/forks","keys_url":"https://api.github.com/repos/ignasi35/lagom/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ignasi35/lagom/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ignasi35/lagom/teams","hooks_url":"https://api.github.com/repos/ignasi35/lagom/hooks","issue_events_url":"https://api.github.com/repos/ignasi35/lagom/issues/events{/number}","events_url":"https://api.github.com/repos/ignasi35/lagom/events","assignees_url":"https://api.github.com/repos/ignasi35/lagom/assignees{/user}","branches_url":"https://api.github.com/repos/ignasi35/lagom/branches{/branch}","tags_url":"https://api.github.com/repos/ignasi35/lagom/tags","blobs_url":"https://api.github.com/repos/ignasi35/lagom/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ignasi35/lagom/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ignasi35/lagom/git/refs{/sha}","trees_url":"https://api.github.com/repos/ignasi35/lagom/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ignasi35/lagom/statuses/{sha}","languages_url":"https://api.github.com/repos/ignasi35/lagom/languages","stargazers_url":"https://api.github.com/repos/ignasi35/lagom/stargazers","contributors_url":"https://api.github.com/repos/ignasi35/lagom/contributors","subscribers_url":"https://api.github.com/repos/ignasi35/lagom/subscribers","subscription_url":"https://api.github.com/repos/ignasi35/lagom/subscription","commits_url":"https://api.github.com/repos/ignasi35/lagom/commits{/sha}","git_commits_url":"https://api.github.com/repos/ignasi35/lagom/git/commits{/sha}","comments_url":"https://api.github.com/repos/ignasi35/lagom/comments{/number}","issue_comment_url":"https://api.github.com/repos/ignasi35/lagom/issues/comments{/number}","contents_url":"https://api.github.com/repos/ignasi35/lagom/contents/{+path}","compare_url":"https://api.github.com/repos/ignasi35/lagom/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ignasi35/lagom/merges","archive_url":"https://api.github.com/repos/ignasi35/lagom/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ignasi35/lagom/downloads","issues_url":"https://api.github.com/repos/ignasi35/lagom/issues{/number}","pulls_url":"https://api.github.com/repos/ignasi35/lagom/pulls{/number}","milestones_url":"https://api.github.com/repos/ignasi35/lagom/milestones{/number}","notifications_url":"https://api.github.com/repos/ignasi35/lagom/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ignasi35/lagom/labels{/name}","releases_url":"https://api.github.com/repos/ignasi35/lagom/releases{/id}","deployments_url":"https://api.github.com/repos/ignasi35/lagom/deployments","created_at":"2016-11-02T13:59:39Z","updated_at":"2016-11-02T13:59:43Z","pushed_at":"2018-07-24T16:46:24Z","git_url":"git://github.com/ignasi35/lagom.git","ssh_url":"git@github.com:ignasi35/lagom.git","clone_url":"https://github.com/ignasi35/lagom.git","svn_url":"https://github.com/ignasi35/lagom","homepage":"https://lightbend.com/lagom","size":8165,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"lagom:master","ref":"master","sha":"715a908a421ff861cbf46fe8f5979a23d0cf6db0","user":{"login":"lagom","id":17168851,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MTY4ODUx","avatar_url":"https://avatars1.githubusercontent.com/u/17168851?v=4","gravatar_id":"","url":"https://api.github.com/users/lagom","html_url":"https://github.com/lagom","followers_url":"https://api.github.com/users/lagom/followers","following_url":"https://api.github.com/users/lagom/following{/other_user}","gists_url":"https://api.github.com/users/lagom/gists{/gist_id}","starred_url":"https://api.github.com/users/lagom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lagom/subscriptions","organizations_url":"https://api.github.com/users/lagom/orgs","repos_url":"https://api.github.com/users/lagom/repos","events_url":"https://api.github.com/users/lagom/events{/privacy}","received_events_url":"https://api.github.com/users/lagom/received_events","type":"Organization","site_admin":false},"repo":{"id":52320967,"node_id":"MDEwOlJlcG9zaXRvcnk1MjMyMDk2Nw==","name":"lagom","full_name":"lagom/lagom","owner":{"login":"lagom","id":17168851,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MTY4ODUx","avatar_url":"https://avatars1.githubusercontent.com/u/17168851?v=4","gravatar_id":"","url":"https://api.github.com/users/lagom","html_url":"https://github.com/lagom","followers_url":"https://api.github.com/users/lagom/followers","following_url":"https://api.github.com/users/lagom/following{/other_user}","gists_url":"https://api.github.com/users/lagom/gists{/gist_id}","starred_url":"https://api.github.com/users/lagom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lagom/subscriptions","organizations_url":"https://api.github.com/users/lagom/orgs","repos_url":"https://api.github.com/users/lagom/repos","events_url":"https://api.github.com/users/lagom/events{/privacy}","received_events_url":"https://api.github.com/users/lagom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lagom/lagom","description":"Reactive Microservices for the JVM","fork":false,"url":"https://api.github.com/repos/lagom/lagom","forks_url":"https://api.github.com/repos/lagom/lagom/forks","keys_url":"https://api.github.com/repos/lagom/lagom/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lagom/lagom/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lagom/lagom/teams","hooks_url":"https://api.github.com/repos/lagom/lagom/hooks","issue_events_url":"https://api.github.com/repos/lagom/lagom/issues/events{/number}","events_url":"https://api.github.com/repos/lagom/lagom/events","assignees_url":"https://api.github.com/repos/lagom/lagom/assignees{/user}","branches_url":"https://api.github.com/repos/lagom/lagom/branches{/branch}","tags_url":"https://api.github.com/repos/lagom/lagom/tags","blobs_url":"https://api.github.com/repos/lagom/lagom/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lagom/lagom/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lagom/lagom/git/refs{/sha}","trees_url":"https://api.github.com/repos/lagom/lagom/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lagom/lagom/statuses/{sha}","languages_url":"https://api.github.com/repos/lagom/lagom/languages","stargazers_url":"https://api.github.com/repos/lagom/lagom/stargazers","contributors_url":"https://api.github.com/repos/lagom/lagom/contributors","subscribers_url":"https://api.github.com/repos/lagom/lagom/subscribers","subscription_url":"https://api.github.com/repos/lagom/lagom/subscription","commits_url":"https://api.github.com/repos/lagom/lagom/commits{/sha}","git_commits_url":"https://api.github.com/repos/lagom/lagom/git/commits{/sha}","comments_url":"https://api.github.com/repos/lagom/lagom/comments{/number}","issue_comment_url":"https://api.github.com/repos/lagom/lagom/issues/comments{/number}","contents_url":"https://api.github.com/repos/lagom/lagom/contents/{+path}","compare_url":"https://api.github.com/repos/lagom/lagom/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lagom/lagom/merges","archive_url":"https://api.github.com/repos/lagom/lagom/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lagom/lagom/downloads","issues_url":"https://api.github.com/repos/lagom/lagom/issues{/number}","pulls_url":"https://api.github.com/repos/lagom/lagom/pulls{/number}","milestones_url":"https://api.github.com/repos/lagom/lagom/milestones{/number}","notifications_url":"https://api.github.com/repos/lagom/lagom/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lagom/lagom/labels{/name}","releases_url":"https://api.github.com/repos/lagom/lagom/releases{/id}","deployments_url":"https://api.github.com/repos/lagom/lagom/deployments","created_at":"2016-02-23T01:51:06Z","updated_at":"2018-07-24T16:31:54Z","pushed_at":"2018-07-24T16:46:26Z","git_url":"git://github.com/lagom/lagom.git","ssh_url":"git@github.com:lagom/lagom.git","clone_url":"https://github.com/lagom/lagom.git","svn_url":"https://github.com/lagom/lagom","homepage":"https://www.lagomframework.com","size":8190,"stargazers_count":1942,"watchers_count":1942,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":418,"mirror_url":null,"archived":false,"open_issues_count":285,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":418,"open_issues":285,"watchers":1942,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lagom/lagom/pulls/1483"},"html":{"href":"https://github.com/lagom/lagom/pull/1483"},"issue":{"href":"https://api.github.com/repos/lagom/lagom/issues/1483"},"comments":{"href":"https://api.github.com/repos/lagom/lagom/issues/1483/comments"},"review_comments":{"href":"https://api.github.com/repos/lagom/lagom/pulls/1483/comments"},"review_comment":{"href":"https://api.github.com/repos/lagom/lagom/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lagom/lagom/pulls/1483/commits"},"statuses":{"href":"https://api.github.com/repos/lagom/lagom/statuses/3ee48110f9a85e5ddc56648158c865318b6deba8"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"ignasi35"}}