{"action":"created","comment":{"url":"https://api.github.com/repos/rsocket/rsocket-cpp/pulls/comments/138439871","pull_request_review_id":62235639,"id":138439871,"diff_hunk":"@@ -47,6 +47,12 @@ const std::shared_ptr<RSocketRequester>& RSocketClient::getRequester() const {\n folly::Future<folly::Unit> RSocketClient::resume() {\n   VLOG(2) << \"Resuming connection\";\n \n+  if (disconnectBaton_) {","path":"rsocket/RSocketClient.cpp","position":13,"original_position":13,"commit_id":"82ed1fe79add0cf92cb883810974a850bc12fe10","original_commit_id":"82ed1fe79add0cf92cb883810974a850bc12fe10","user":{"login":"lehecka","id":8785194,"avatar_url":"https://avatars3.githubusercontent.com/u/8785194?v=4","gravatar_id":"","url":"https://api.github.com/users/lehecka","html_url":"https://github.com/lehecka","followers_url":"https://api.github.com/users/lehecka/followers","following_url":"https://api.github.com/users/lehecka/following{/other_user}","gists_url":"https://api.github.com/users/lehecka/gists{/gist_id}","starred_url":"https://api.github.com/users/lehecka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lehecka/subscriptions","organizations_url":"https://api.github.com/users/lehecka/orgs","repos_url":"https://api.github.com/users/lehecka/repos","events_url":"https://api.github.com/users/lehecka/events{/privacy}","received_events_url":"https://api.github.com/users/lehecka/received_events","type":"User","site_admin":false},"body":"this is not thread safe (and all the other places where we use the Baton). Why do we need it anyways?","created_at":"2017-09-12T19:12:12Z","updated_at":"2017-09-12T19:12:12Z","html_url":"https://github.com/rsocket/rsocket-cpp/pull/744#discussion_r138439871","pull_request_url":"https://api.github.com/repos/rsocket/rsocket-cpp/pulls/744","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/rsocket/rsocket-cpp/pulls/comments/138439871"},"html":{"href":"https://github.com/rsocket/rsocket-cpp/pull/744#discussion_r138439871"},"pull_request":{"href":"https://api.github.com/repos/rsocket/rsocket-cpp/pulls/744"}}},"pull_request":{"url":"https://api.github.com/repos/rsocket/rsocket-cpp/pulls/744","id":140531189,"html_url":"https://github.com/rsocket/rsocket-cpp/pull/744","diff_url":"https://github.com/rsocket/rsocket-cpp/pull/744.diff","patch_url":"https://github.com/rsocket/rsocket-cpp/pull/744.patch","issue_url":"https://api.github.com/repos/rsocket/rsocket-cpp/issues/744","number":744,"state":"open","locked":false,"title":"TCPConnectionAcceptor should not destroy its thread on the `stop` function","user":{"login":"phoad","id":1145864,"avatar_url":"https://avatars3.githubusercontent.com/u/1145864?v=4","gravatar_id":"","url":"https://api.github.com/users/phoad","html_url":"https://github.com/phoad","followers_url":"https://api.github.com/users/phoad/followers","following_url":"https://api.github.com/users/phoad/following{/other_user}","gists_url":"https://api.github.com/users/phoad/gists{/gist_id}","starred_url":"https://api.github.com/users/phoad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phoad/subscriptions","organizations_url":"https://api.github.com/users/phoad/orgs","repos_url":"https://api.github.com/users/phoad/repos","events_url":"https://api.github.com/users/phoad/events{/privacy}","received_events_url":"https://api.github.com/users/phoad/received_events","type":"User","site_admin":false},"body":"TcpConnectionAcceptor was destroying the corresponding thread when it is stopped. \r\nBut, when I took a look at the RSocketServer::shutdownAndWait() function, I see that `connectionManager` is reset later then stopping the acceptors. \r\nConnectionManager uses the event bases of the threads in the Acceptors. \r\nSo if we get rid of these threads, then the corresponding event bases are deleted before it can be used by the ConnectionManager.\r\n\r\nSo we should not destroy the thread at the TCPConnectionAcceptor::stop() function but at the destructor of the TCPConnectionAcceptor.\r\n\r\nI have verified that the HttpConnectionAcceptor's implementation is already correct.\r\n\r\n+ Unit tests for creating connections with existing sockets.\r\n","created_at":"2017-09-12T09:34:45Z","updated_at":"2017-09-12T19:12:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6c25d37575ce7c3c6053e0d3d36ada7912f97a66","assignee":null,"assignees":[],"requested_reviewers":[{"login":"alexmalyshev","id":621989,"avatar_url":"https://avatars3.githubusercontent.com/u/621989?v=4","gravatar_id":"","url":"https://api.github.com/users/alexmalyshev","html_url":"https://github.com/alexmalyshev","followers_url":"https://api.github.com/users/alexmalyshev/followers","following_url":"https://api.github.com/users/alexmalyshev/following{/other_user}","gists_url":"https://api.github.com/users/alexmalyshev/gists{/gist_id}","starred_url":"https://api.github.com/users/alexmalyshev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexmalyshev/subscriptions","organizations_url":"https://api.github.com/users/alexmalyshev/orgs","repos_url":"https://api.github.com/users/alexmalyshev/repos","events_url":"https://api.github.com/users/alexmalyshev/events{/privacy}","received_events_url":"https://api.github.com/users/alexmalyshev/received_events","type":"User","site_admin":false},{"login":"somasun","id":11081860,"avatar_url":"https://avatars3.githubusercontent.com/u/11081860?v=4","gravatar_id":"","url":"https://api.github.com/users/somasun","html_url":"https://github.com/somasun","followers_url":"https://api.github.com/users/somasun/followers","following_url":"https://api.github.com/users/somasun/following{/other_user}","gists_url":"https://api.github.com/users/somasun/gists{/gist_id}","starred_url":"https://api.github.com/users/somasun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/somasun/subscriptions","organizations_url":"https://api.github.com/users/somasun/orgs","repos_url":"https://api.github.com/users/somasun/repos","events_url":"https://api.github.com/users/somasun/events{/privacy}","received_events_url":"https://api.github.com/users/somasun/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/rsocket/rsocket-cpp/pulls/744/commits","review_comments_url":"https://api.github.com/repos/rsocket/rsocket-cpp/pulls/744/comments","review_comment_url":"https://api.github.com/repos/rsocket/rsocket-cpp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rsocket/rsocket-cpp/issues/744/comments","statuses_url":"https://api.github.com/repos/rsocket/rsocket-cpp/statuses/82ed1fe79add0cf92cb883810974a850bc12fe10","head":{"label":"phoad:close","ref":"close","sha":"82ed1fe79add0cf92cb883810974a850bc12fe10","user":{"login":"phoad","id":1145864,"avatar_url":"https://avatars3.githubusercontent.com/u/1145864?v=4","gravatar_id":"","url":"https://api.github.com/users/phoad","html_url":"https://github.com/phoad","followers_url":"https://api.github.com/users/phoad/followers","following_url":"https://api.github.com/users/phoad/following{/other_user}","gists_url":"https://api.github.com/users/phoad/gists{/gist_id}","starred_url":"https://api.github.com/users/phoad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phoad/subscriptions","organizations_url":"https://api.github.com/users/phoad/orgs","repos_url":"https://api.github.com/users/phoad/repos","events_url":"https://api.github.com/users/phoad/events{/privacy}","received_events_url":"https://api.github.com/users/phoad/received_events","type":"User","site_admin":false},"repo":{"id":90793353,"name":"rsocket-cpp","full_name":"phoad/rsocket-cpp","owner":{"login":"phoad","id":1145864,"avatar_url":"https://avatars3.githubusercontent.com/u/1145864?v=4","gravatar_id":"","url":"https://api.github.com/users/phoad","html_url":"https://github.com/phoad","followers_url":"https://api.github.com/users/phoad/followers","following_url":"https://api.github.com/users/phoad/following{/other_user}","gists_url":"https://api.github.com/users/phoad/gists{/gist_id}","starred_url":"https://api.github.com/users/phoad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phoad/subscriptions","organizations_url":"https://api.github.com/users/phoad/orgs","repos_url":"https://api.github.com/users/phoad/repos","events_url":"https://api.github.com/users/phoad/events{/privacy}","received_events_url":"https://api.github.com/users/phoad/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/phoad/rsocket-cpp","description":"C++ implementation of RSocket","fork":true,"url":"https://api.github.com/repos/phoad/rsocket-cpp","forks_url":"https://api.github.com/repos/phoad/rsocket-cpp/forks","keys_url":"https://api.github.com/repos/phoad/rsocket-cpp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phoad/rsocket-cpp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phoad/rsocket-cpp/teams","hooks_url":"https://api.github.com/repos/phoad/rsocket-cpp/hooks","issue_events_url":"https://api.github.com/repos/phoad/rsocket-cpp/issues/events{/number}","events_url":"https://api.github.com/repos/phoad/rsocket-cpp/events","assignees_url":"https://api.github.com/repos/phoad/rsocket-cpp/assignees{/user}","branches_url":"https://api.github.com/repos/phoad/rsocket-cpp/branches{/branch}","tags_url":"https://api.github.com/repos/phoad/rsocket-cpp/tags","blobs_url":"https://api.github.com/repos/phoad/rsocket-cpp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phoad/rsocket-cpp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phoad/rsocket-cpp/git/refs{/sha}","trees_url":"https://api.github.com/repos/phoad/rsocket-cpp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phoad/rsocket-cpp/statuses/{sha}","languages_url":"https://api.github.com/repos/phoad/rsocket-cpp/languages","stargazers_url":"https://api.github.com/repos/phoad/rsocket-cpp/stargazers","contributors_url":"https://api.github.com/repos/phoad/rsocket-cpp/contributors","subscribers_url":"https://api.github.com/repos/phoad/rsocket-cpp/subscribers","subscription_url":"https://api.github.com/repos/phoad/rsocket-cpp/subscription","commits_url":"https://api.github.com/repos/phoad/rsocket-cpp/commits{/sha}","git_commits_url":"https://api.github.com/repos/phoad/rsocket-cpp/git/commits{/sha}","comments_url":"https://api.github.com/repos/phoad/rsocket-cpp/comments{/number}","issue_comment_url":"https://api.github.com/repos/phoad/rsocket-cpp/issues/comments{/number}","contents_url":"https://api.github.com/repos/phoad/rsocket-cpp/contents/{+path}","compare_url":"https://api.github.com/repos/phoad/rsocket-cpp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phoad/rsocket-cpp/merges","archive_url":"https://api.github.com/repos/phoad/rsocket-cpp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phoad/rsocket-cpp/downloads","issues_url":"https://api.github.com/repos/phoad/rsocket-cpp/issues{/number}","pulls_url":"https://api.github.com/repos/phoad/rsocket-cpp/pulls{/number}","milestones_url":"https://api.github.com/repos/phoad/rsocket-cpp/milestones{/number}","notifications_url":"https://api.github.com/repos/phoad/rsocket-cpp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phoad/rsocket-cpp/labels{/name}","releases_url":"https://api.github.com/repos/phoad/rsocket-cpp/releases{/id}","deployments_url":"https://api.github.com/repos/phoad/rsocket-cpp/deployments","created_at":"2017-05-09T21:26:05Z","updated_at":"2017-05-09T21:26:07Z","pushed_at":"2017-09-12T09:49:52Z","git_url":"git://github.com/phoad/rsocket-cpp.git","ssh_url":"git@github.com:phoad/rsocket-cpp.git","clone_url":"https://github.com/phoad/rsocket-cpp.git","svn_url":"https://github.com/phoad/rsocket-cpp","homepage":"","size":4359,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"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":"rsocket:master","ref":"master","sha":"ec92074e3e9bbd6be1f390f376f3e8dcddaee055","user":{"login":"rsocket","id":25459855,"avatar_url":"https://avatars3.githubusercontent.com/u/25459855?v=4","gravatar_id":"","url":"https://api.github.com/users/rsocket","html_url":"https://github.com/rsocket","followers_url":"https://api.github.com/users/rsocket/followers","following_url":"https://api.github.com/users/rsocket/following{/other_user}","gists_url":"https://api.github.com/users/rsocket/gists{/gist_id}","starred_url":"https://api.github.com/users/rsocket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsocket/subscriptions","organizations_url":"https://api.github.com/users/rsocket/orgs","repos_url":"https://api.github.com/users/rsocket/repos","events_url":"https://api.github.com/users/rsocket/events{/privacy}","received_events_url":"https://api.github.com/users/rsocket/received_events","type":"Organization","site_admin":false},"repo":{"id":53889141,"name":"rsocket-cpp","full_name":"rsocket/rsocket-cpp","owner":{"login":"rsocket","id":25459855,"avatar_url":"https://avatars3.githubusercontent.com/u/25459855?v=4","gravatar_id":"","url":"https://api.github.com/users/rsocket","html_url":"https://github.com/rsocket","followers_url":"https://api.github.com/users/rsocket/followers","following_url":"https://api.github.com/users/rsocket/following{/other_user}","gists_url":"https://api.github.com/users/rsocket/gists{/gist_id}","starred_url":"https://api.github.com/users/rsocket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsocket/subscriptions","organizations_url":"https://api.github.com/users/rsocket/orgs","repos_url":"https://api.github.com/users/rsocket/repos","events_url":"https://api.github.com/users/rsocket/events{/privacy}","received_events_url":"https://api.github.com/users/rsocket/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rsocket/rsocket-cpp","description":"C++ implementation of RSocket","fork":false,"url":"https://api.github.com/repos/rsocket/rsocket-cpp","forks_url":"https://api.github.com/repos/rsocket/rsocket-cpp/forks","keys_url":"https://api.github.com/repos/rsocket/rsocket-cpp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rsocket/rsocket-cpp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rsocket/rsocket-cpp/teams","hooks_url":"https://api.github.com/repos/rsocket/rsocket-cpp/hooks","issue_events_url":"https://api.github.com/repos/rsocket/rsocket-cpp/issues/events{/number}","events_url":"https://api.github.com/repos/rsocket/rsocket-cpp/events","assignees_url":"https://api.github.com/repos/rsocket/rsocket-cpp/assignees{/user}","branches_url":"https://api.github.com/repos/rsocket/rsocket-cpp/branches{/branch}","tags_url":"https://api.github.com/repos/rsocket/rsocket-cpp/tags","blobs_url":"https://api.github.com/repos/rsocket/rsocket-cpp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rsocket/rsocket-cpp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rsocket/rsocket-cpp/git/refs{/sha}","trees_url":"https://api.github.com/repos/rsocket/rsocket-cpp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rsocket/rsocket-cpp/statuses/{sha}","languages_url":"https://api.github.com/repos/rsocket/rsocket-cpp/languages","stargazers_url":"https://api.github.com/repos/rsocket/rsocket-cpp/stargazers","contributors_url":"https://api.github.com/repos/rsocket/rsocket-cpp/contributors","subscribers_url":"https://api.github.com/repos/rsocket/rsocket-cpp/subscribers","subscription_url":"https://api.github.com/repos/rsocket/rsocket-cpp/subscription","commits_url":"https://api.github.com/repos/rsocket/rsocket-cpp/commits{/sha}","git_commits_url":"https://api.github.com/repos/rsocket/rsocket-cpp/git/commits{/sha}","comments_url":"https://api.github.com/repos/rsocket/rsocket-cpp/comments{/number}","issue_comment_url":"https://api.github.com/repos/rsocket/rsocket-cpp/issues/comments{/number}","contents_url":"https://api.github.com/repos/rsocket/rsocket-cpp/contents/{+path}","compare_url":"https://api.github.com/repos/rsocket/rsocket-cpp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rsocket/rsocket-cpp/merges","archive_url":"https://api.github.com/repos/rsocket/rsocket-cpp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rsocket/rsocket-cpp/downloads","issues_url":"https://api.github.com/repos/rsocket/rsocket-cpp/issues{/number}","pulls_url":"https://api.github.com/repos/rsocket/rsocket-cpp/pulls{/number}","milestones_url":"https://api.github.com/repos/rsocket/rsocket-cpp/milestones{/number}","notifications_url":"https://api.github.com/repos/rsocket/rsocket-cpp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rsocket/rsocket-cpp/labels{/name}","releases_url":"https://api.github.com/repos/rsocket/rsocket-cpp/releases{/id}","deployments_url":"https://api.github.com/repos/rsocket/rsocket-cpp/deployments","created_at":"2016-03-14T20:20:55Z","updated_at":"2017-09-07T07:47:19Z","pushed_at":"2017-09-12T09:49:53Z","git_url":"git://github.com/rsocket/rsocket-cpp.git","ssh_url":"git@github.com:rsocket/rsocket-cpp.git","clone_url":"https://github.com/rsocket/rsocket-cpp.git","svn_url":"https://github.com/rsocket/rsocket-cpp","homepage":"http://rsocket.io","size":4351,"stargazers_count":42,"watchers_count":42,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":32,"mirror_url":null,"open_issues_count":24,"forks":32,"open_issues":24,"watchers":42,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rsocket/rsocket-cpp/pulls/744"},"html":{"href":"https://github.com/rsocket/rsocket-cpp/pull/744"},"issue":{"href":"https://api.github.com/repos/rsocket/rsocket-cpp/issues/744"},"comments":{"href":"https://api.github.com/repos/rsocket/rsocket-cpp/issues/744/comments"},"review_comments":{"href":"https://api.github.com/repos/rsocket/rsocket-cpp/pulls/744/comments"},"review_comment":{"href":"https://api.github.com/repos/rsocket/rsocket-cpp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rsocket/rsocket-cpp/pulls/744/commits"},"statuses":{"href":"https://api.github.com/repos/rsocket/rsocket-cpp/statuses/82ed1fe79add0cf92cb883810974a850bc12fe10"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"lehecka"}}