{"action":"created","issue":{"url":"https://api.github.com/repos/envoyproxy/envoy/issues/5277","repository_url":"https://api.github.com/repos/envoyproxy/envoy","labels_url":"https://api.github.com/repos/envoyproxy/envoy/issues/5277/labels{/name}","comments_url":"https://api.github.com/repos/envoyproxy/envoy/issues/5277/comments","events_url":"https://api.github.com/repos/envoyproxy/envoy/issues/5277/events","html_url":"https://github.com/envoyproxy/envoy/issues/5277","id":390105751,"node_id":"MDU6SXNzdWUzOTAxMDU3NTE=","number":5277,"title":"useless operation in function ConnectionHandlerImpl::ActiveListener::onAccept","user":{"login":"hello-jianghongke","id":45632685,"node_id":"MDQ6VXNlcjQ1NjMyNjg1","avatar_url":"https://avatars1.githubusercontent.com/u/45632685?v=4","gravatar_id":"","url":"https://api.github.com/users/hello-jianghongke","html_url":"https://github.com/hello-jianghongke","followers_url":"https://api.github.com/users/hello-jianghongke/followers","following_url":"https://api.github.com/users/hello-jianghongke/following{/other_user}","gists_url":"https://api.github.com/users/hello-jianghongke/gists{/gist_id}","starred_url":"https://api.github.com/users/hello-jianghongke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hello-jianghongke/subscriptions","organizations_url":"https://api.github.com/users/hello-jianghongke/orgs","repos_url":"https://api.github.com/users/hello-jianghongke/repos","events_url":"https://api.github.com/users/hello-jianghongke/events{/privacy}","received_events_url":"https://api.github.com/users/hello-jianghongke/received_events","type":"User","site_admin":false},"labels":[{"id":527497761,"node_id":"MDU6TGFiZWw1Mjc0OTc3NjE=","url":"https://api.github.com/repos/envoyproxy/envoy/labels/tech%20debt","name":"tech debt","color":"0e8a16","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-12T07:58:30Z","updated_at":"2018-12-13T09:53:04Z","closed_at":null,"author_association":"NONE","body":"found an useless operation in function ConnectionHandlerImpl::ActiveListener::onAccept\r\n\r\n```\r\nvoid ConnectionHandlerImpl::ActiveListener::onAccept(\r\n    Network::ConnectionSocketPtr&& socket, bool hand_off_restored_destination_connections) {\r\n  Network::Address::InstanceConstSharedPtr local_address = socket->localAddress();\r\n  auto active_socket = std::make_unique<ActiveSocket>(*this, std::move(socket),\r\n                                                      hand_off_restored_destination_connections);\r\n\r\n  // Create and run the filters\r\n  config_.filterChainFactory().createListenerFilterChain(*active_socket);\r\n  active_socket->continueFilterChain(true);\r\n\r\n  // Move active_socket to the sockets_ list if filter iteration needs to continue later.\r\n  // Otherwise we let active_socket be destructed when it goes out of scope.\r\n  if (active_socket->iter_ != active_socket->accept_filters_.end()) {\r\n    active_socket->moveIntoListBack(std::move(active_socket), sockets_);\r\n  }\r\n}\r\n```\r\nI think the line `Network::Address::InstanceConstSharedPtr local_address = socket->localAddress();` is useless, and shoule be removed.\r\n"},"comment":{"url":"https://api.github.com/repos/envoyproxy/envoy/issues/comments/446907808","html_url":"https://github.com/envoyproxy/envoy/issues/5277#issuecomment-446907808","issue_url":"https://api.github.com/repos/envoyproxy/envoy/issues/5277","id":446907808,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NjkwNzgwOA==","user":{"login":"hello-jianghongke","id":45632685,"node_id":"MDQ6VXNlcjQ1NjMyNjg1","avatar_url":"https://avatars1.githubusercontent.com/u/45632685?v=4","gravatar_id":"","url":"https://api.github.com/users/hello-jianghongke","html_url":"https://github.com/hello-jianghongke","followers_url":"https://api.github.com/users/hello-jianghongke/followers","following_url":"https://api.github.com/users/hello-jianghongke/following{/other_user}","gists_url":"https://api.github.com/users/hello-jianghongke/gists{/gist_id}","starred_url":"https://api.github.com/users/hello-jianghongke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hello-jianghongke/subscriptions","organizations_url":"https://api.github.com/users/hello-jianghongke/orgs","repos_url":"https://api.github.com/users/hello-jianghongke/repos","events_url":"https://api.github.com/users/hello-jianghongke/events{/privacy}","received_events_url":"https://api.github.com/users/hello-jianghongke/received_events","type":"User","site_admin":false},"created_at":"2018-12-13T09:53:04Z","updated_at":"2018-12-13T09:53:04Z","author_association":"NONE","body":"OK"}}
{"actor":{"display_login":"hello-jianghongke"}}