{"action":"created","comment":{"url":"https://api.github.com/repos/eclipse/hono/pulls/comments/165382183","pull_request_review_id":93302072,"id":165382183,"diff_hunk":"@@ -327,6 +327,15 @@ public final void onClientAttach(final UpstreamReceiver client, final Handler<As\n             createSender(targetAddress, replenishedSender -> handleFlow(replenishedSender, client)).compose(createdSender -> {\n                 addSender(client, createdSender);\n                 tracker.complete();\n+                createdSender.detachHandler(detachHandler -> {\n+                    if (detachHandler.succeeded()) {\n+                        logger.info(\"downstream sender was closed detached [con: {}, link: {}]\", client.getConnectionId(), client.getLinkId());\n+                    } else {\n+                        logger.warn(\"downstream sender was closed detached [con: {}, link: {}]: {}\", client.getConnectionId(), client.getLinkId(), detachHandler.cause().getMessage());\n+                    }\n+                    createdSender.close();\n+                    resultHandler.handle(Future.failedFuture(detachHandler.cause()));","path":"services/messaging/src/main/java/org/eclipse/hono/messaging/ForwardingDownstreamAdapter.java","position":11,"original_position":11,"commit_id":"710e22b440448ea42438512c1a49daac698e9b06","original_commit_id":"710e22b440448ea42438512c1a49daac698e9b06","user":{"login":"sophokles73","id":5682135,"avatar_url":"https://avatars1.githubusercontent.com/u/5682135?v=4","gravatar_id":"","url":"https://api.github.com/users/sophokles73","html_url":"https://github.com/sophokles73","followers_url":"https://api.github.com/users/sophokles73/followers","following_url":"https://api.github.com/users/sophokles73/following{/other_user}","gists_url":"https://api.github.com/users/sophokles73/gists{/gist_id}","starred_url":"https://api.github.com/users/sophokles73/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sophokles73/subscriptions","organizations_url":"https://api.github.com/users/sophokles73/orgs","repos_url":"https://api.github.com/users/sophokles73/repos","events_url":"https://api.github.com/users/sophokles73/events{/privacy}","received_events_url":"https://api.github.com/users/sophokles73/received_events","type":"User","site_admin":false},"body":"this seems to be wrong. the resultHandler has already been completed by the *tracker* Future. \r\nwhen the peer (the router) detaches this sender link, then we need to do some house keeping:\r\n1. close the link and remove it from the list of downstream senders\r\n2. close the upstream receiver link","created_at":"2018-02-01T15:03:42Z","updated_at":"2018-02-01T15:05:36Z","html_url":"https://github.com/eclipse/hono/pull/472#discussion_r165382183","pull_request_url":"https://api.github.com/repos/eclipse/hono/pulls/472","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/eclipse/hono/pulls/comments/165382183"},"html":{"href":"https://github.com/eclipse/hono/pull/472#discussion_r165382183"},"pull_request":{"href":"https://api.github.com/repos/eclipse/hono/pulls/472"}}},"pull_request":{"url":"https://api.github.com/repos/eclipse/hono/pulls/472","id":166222565,"html_url":"https://github.com/eclipse/hono/pull/472","diff_url":"https://github.com/eclipse/hono/pull/472.diff","patch_url":"https://github.com/eclipse/hono/pull/472.patch","issue_url":"https://api.github.com/repos/eclipse/hono/issues/472","number":472,"state":"open","locked":false,"title":"Introduction of a detach handler at links in Hono Client.","user":{"login":"pellmann","id":12810428,"avatar_url":"https://avatars0.githubusercontent.com/u/12810428?v=4","gravatar_id":"","url":"https://api.github.com/users/pellmann","html_url":"https://github.com/pellmann","followers_url":"https://api.github.com/users/pellmann/followers","following_url":"https://api.github.com/users/pellmann/following{/other_user}","gists_url":"https://api.github.com/users/pellmann/gists{/gist_id}","starred_url":"https://api.github.com/users/pellmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pellmann/subscriptions","organizations_url":"https://api.github.com/users/pellmann/orgs","repos_url":"https://api.github.com/users/pellmann/repos","events_url":"https://api.github.com/users/pellmann/events{/privacy}","received_events_url":"https://api.github.com/users/pellmann/received_events","type":"User","site_admin":false},"body":"The client application can react on a detach(close=false) and reopen the link later (retry).\r\nIn future this should be handled inside the Hono client as well as the connection retry.\r\n","created_at":"2018-01-31T10:39:43Z","updated_at":"2018-02-01T15:05:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"23e019e0d81fd87fc0ec1951285fb67a902bea75","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/eclipse/hono/pulls/472/commits","review_comments_url":"https://api.github.com/repos/eclipse/hono/pulls/472/comments","review_comment_url":"https://api.github.com/repos/eclipse/hono/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eclipse/hono/issues/472/comments","statuses_url":"https://api.github.com/repos/eclipse/hono/statuses/710e22b440448ea42438512c1a49daac698e9b06","head":{"label":"bsinno:467_detach_and_open","ref":"467_detach_and_open","sha":"710e22b440448ea42438512c1a49daac698e9b06","user":{"login":"bsinno","id":9215699,"avatar_url":"https://avatars3.githubusercontent.com/u/9215699?v=4","gravatar_id":"","url":"https://api.github.com/users/bsinno","html_url":"https://github.com/bsinno","followers_url":"https://api.github.com/users/bsinno/followers","following_url":"https://api.github.com/users/bsinno/following{/other_user}","gists_url":"https://api.github.com/users/bsinno/gists{/gist_id}","starred_url":"https://api.github.com/users/bsinno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsinno/subscriptions","organizations_url":"https://api.github.com/users/bsinno/orgs","repos_url":"https://api.github.com/users/bsinno/repos","events_url":"https://api.github.com/users/bsinno/events{/privacy}","received_events_url":"https://api.github.com/users/bsinno/received_events","type":"Organization","site_admin":false},"repo":{"id":51764062,"name":"hono","full_name":"bsinno/hono","owner":{"login":"bsinno","id":9215699,"avatar_url":"https://avatars3.githubusercontent.com/u/9215699?v=4","gravatar_id":"","url":"https://api.github.com/users/bsinno","html_url":"https://github.com/bsinno","followers_url":"https://api.github.com/users/bsinno/followers","following_url":"https://api.github.com/users/bsinno/following{/other_user}","gists_url":"https://api.github.com/users/bsinno/gists{/gist_id}","starred_url":"https://api.github.com/users/bsinno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsinno/subscriptions","organizations_url":"https://api.github.com/users/bsinno/orgs","repos_url":"https://api.github.com/users/bsinno/repos","events_url":"https://api.github.com/users/bsinno/events{/privacy}","received_events_url":"https://api.github.com/users/bsinno/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bsinno/hono","description":"Hono project","fork":true,"url":"https://api.github.com/repos/bsinno/hono","forks_url":"https://api.github.com/repos/bsinno/hono/forks","keys_url":"https://api.github.com/repos/bsinno/hono/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bsinno/hono/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bsinno/hono/teams","hooks_url":"https://api.github.com/repos/bsinno/hono/hooks","issue_events_url":"https://api.github.com/repos/bsinno/hono/issues/events{/number}","events_url":"https://api.github.com/repos/bsinno/hono/events","assignees_url":"https://api.github.com/repos/bsinno/hono/assignees{/user}","branches_url":"https://api.github.com/repos/bsinno/hono/branches{/branch}","tags_url":"https://api.github.com/repos/bsinno/hono/tags","blobs_url":"https://api.github.com/repos/bsinno/hono/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bsinno/hono/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bsinno/hono/git/refs{/sha}","trees_url":"https://api.github.com/repos/bsinno/hono/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bsinno/hono/statuses/{sha}","languages_url":"https://api.github.com/repos/bsinno/hono/languages","stargazers_url":"https://api.github.com/repos/bsinno/hono/stargazers","contributors_url":"https://api.github.com/repos/bsinno/hono/contributors","subscribers_url":"https://api.github.com/repos/bsinno/hono/subscribers","subscription_url":"https://api.github.com/repos/bsinno/hono/subscription","commits_url":"https://api.github.com/repos/bsinno/hono/commits{/sha}","git_commits_url":"https://api.github.com/repos/bsinno/hono/git/commits{/sha}","comments_url":"https://api.github.com/repos/bsinno/hono/comments{/number}","issue_comment_url":"https://api.github.com/repos/bsinno/hono/issues/comments{/number}","contents_url":"https://api.github.com/repos/bsinno/hono/contents/{+path}","compare_url":"https://api.github.com/repos/bsinno/hono/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bsinno/hono/merges","archive_url":"https://api.github.com/repos/bsinno/hono/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bsinno/hono/downloads","issues_url":"https://api.github.com/repos/bsinno/hono/issues{/number}","pulls_url":"https://api.github.com/repos/bsinno/hono/pulls{/number}","milestones_url":"https://api.github.com/repos/bsinno/hono/milestones{/number}","notifications_url":"https://api.github.com/repos/bsinno/hono/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bsinno/hono/labels{/name}","releases_url":"https://api.github.com/repos/bsinno/hono/releases{/id}","deployments_url":"https://api.github.com/repos/bsinno/hono/deployments","created_at":"2016-02-15T15:18:09Z","updated_at":"2017-09-28T14:18:09Z","pushed_at":"2018-02-01T14:45:11Z","git_url":"git://github.com/bsinno/hono.git","ssh_url":"git@github.com:bsinno/hono.git","clone_url":"https://github.com/bsinno/hono.git","svn_url":"https://github.com/bsinno/hono","homepage":null,"size":9460,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"epl-1.0","name":"Eclipse Public License 1.0","spdx_id":"EPL-1.0","url":"https://api.github.com/licenses/epl-1.0"},"forks":1,"open_issues":0,"watchers":3,"default_branch":"master"}},"base":{"label":"eclipse:master","ref":"master","sha":"33acfc574793c4b0b2bc98bc9f4a4d8cc0ea221a","user":{"login":"eclipse","id":56974,"avatar_url":"https://avatars1.githubusercontent.com/u/56974?v=4","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"repo":{"id":51307016,"name":"hono","full_name":"eclipse/hono","owner":{"login":"eclipse","id":56974,"avatar_url":"https://avatars1.githubusercontent.com/u/56974?v=4","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eclipse/hono","description":"Eclipse Hono™ Project","fork":false,"url":"https://api.github.com/repos/eclipse/hono","forks_url":"https://api.github.com/repos/eclipse/hono/forks","keys_url":"https://api.github.com/repos/eclipse/hono/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eclipse/hono/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eclipse/hono/teams","hooks_url":"https://api.github.com/repos/eclipse/hono/hooks","issue_events_url":"https://api.github.com/repos/eclipse/hono/issues/events{/number}","events_url":"https://api.github.com/repos/eclipse/hono/events","assignees_url":"https://api.github.com/repos/eclipse/hono/assignees{/user}","branches_url":"https://api.github.com/repos/eclipse/hono/branches{/branch}","tags_url":"https://api.github.com/repos/eclipse/hono/tags","blobs_url":"https://api.github.com/repos/eclipse/hono/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eclipse/hono/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eclipse/hono/git/refs{/sha}","trees_url":"https://api.github.com/repos/eclipse/hono/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eclipse/hono/statuses/{sha}","languages_url":"https://api.github.com/repos/eclipse/hono/languages","stargazers_url":"https://api.github.com/repos/eclipse/hono/stargazers","contributors_url":"https://api.github.com/repos/eclipse/hono/contributors","subscribers_url":"https://api.github.com/repos/eclipse/hono/subscribers","subscription_url":"https://api.github.com/repos/eclipse/hono/subscription","commits_url":"https://api.github.com/repos/eclipse/hono/commits{/sha}","git_commits_url":"https://api.github.com/repos/eclipse/hono/git/commits{/sha}","comments_url":"https://api.github.com/repos/eclipse/hono/comments{/number}","issue_comment_url":"https://api.github.com/repos/eclipse/hono/issues/comments{/number}","contents_url":"https://api.github.com/repos/eclipse/hono/contents/{+path}","compare_url":"https://api.github.com/repos/eclipse/hono/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eclipse/hono/merges","archive_url":"https://api.github.com/repos/eclipse/hono/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eclipse/hono/downloads","issues_url":"https://api.github.com/repos/eclipse/hono/issues{/number}","pulls_url":"https://api.github.com/repos/eclipse/hono/pulls{/number}","milestones_url":"https://api.github.com/repos/eclipse/hono/milestones{/number}","notifications_url":"https://api.github.com/repos/eclipse/hono/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eclipse/hono/labels{/name}","releases_url":"https://api.github.com/repos/eclipse/hono/releases{/id}","deployments_url":"https://api.github.com/repos/eclipse/hono/deployments","created_at":"2016-02-08T15:45:28Z","updated_at":"2018-02-01T02:48:25Z","pushed_at":"2018-02-01T14:45:12Z","git_url":"git://github.com/eclipse/hono.git","ssh_url":"git@github.com:eclipse/hono.git","clone_url":"https://github.com/eclipse/hono.git","svn_url":"https://github.com/eclipse/hono","homepage":"http://www.eclipse.org/hono","size":9708,"stargazers_count":115,"watchers_count":115,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"archived":false,"open_issues_count":44,"license":{"key":"epl-1.0","name":"Eclipse Public License 1.0","spdx_id":"EPL-1.0","url":"https://api.github.com/licenses/epl-1.0"},"forks":28,"open_issues":44,"watchers":115,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eclipse/hono/pulls/472"},"html":{"href":"https://github.com/eclipse/hono/pull/472"},"issue":{"href":"https://api.github.com/repos/eclipse/hono/issues/472"},"comments":{"href":"https://api.github.com/repos/eclipse/hono/issues/472/comments"},"review_comments":{"href":"https://api.github.com/repos/eclipse/hono/pulls/472/comments"},"review_comment":{"href":"https://api.github.com/repos/eclipse/hono/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eclipse/hono/pulls/472/commits"},"statuses":{"href":"https://api.github.com/repos/eclipse/hono/statuses/710e22b440448ea42438512c1a49daac698e9b06"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"sophokles73"}}