GitHub PullRequestReviewCommentEvent at 2014-11-06 21:29:10
Repository: bomberman
Actor: Neki
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/Neki/bomberman/pulls/comments/19976723","id":19976723,"diff_hunk":"@@ -293,6 +301,20 @@ void GameNetworkWorker::BroadcastWorld() {\n   }\n }\n \n+void GameNetworkWorker::DetectConnectionLost() {\n+  for(auto it = last_received_pings_.begin(); it != last_received_pings_.end(); ++it) {\n+    if(game_timer_->GetTimestamp() > it->second + kDisconnectTimeout) {\n+      auto itt = clients_.find(it->first);\n+      assert(itt != clients_.end());\n+      Client client = itt->second;\n+      client.SetConnected(false);\n+      LOG(INFO) << \"The client \" << (int) client.GetId() << \" did not send a ping for at least 10 seconds ; marking it as disconnected.\";","path":"src/server/net/GameNetworkWorker.cc","position":51,"original_position":51,"commit_id":"5268e4310a152015a42f23158ab8437f709195d4","original_commit_id":"5268e4310a152015a42f23158ab8437f709195d4","user":{"login":"Neki","id":2143664,"avatar_url":"https://avatars.githubusercontent.com/u/2143664?v=2","gravatar_id":"","url":"https://api.github.com/users/Neki","html_url":"https://github.com/Neki","followers_url":"https://api.github.com/users/Neki/followers","following_url":"https://api.github.com/users/Neki/following{/other_user}","gists_url":"https://api.github.com/users/Neki/gists{/gist_id}","starred_url":"https://api.github.com/users/Neki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Neki/subscriptions","organizations_url":"https://api.github.com/users/Neki/orgs","repos_url":"https://api.github.com/users/Neki/repos","events_url":"https://api.github.com/users/Neki/events{/privacy}","received_events_url":"https://api.github.com/users/Neki/received_events","type":"User","site_admin":false},"body":"Bien vu.","created_at":"2014-11-06T21:29:10Z","updated_at":"2014-11-06T21:29:10Z","html_url":"https://github.com/Neki/bomberman/pull/44#discussion_r19976723","pull_request_url":"https://api.github.com/repos/Neki/bomberman/pulls/44","_links":{"self":{"href":"https://api.github.com/repos/Neki/bomberman/pulls/comments/19976723"},"html":{"href":"https://github.com/Neki/bomberman/pull/44#discussion_r19976723"},"pull_request":{"href":"https://api.github.com/repos/Neki/bomberman/pulls/44"}}},"pull_request":{"url":"https://api.github.com/repos/Neki/bomberman/pulls/44","id":23935716,"html_url":"https://github.com/Neki/bomberman/pull/44","diff_url":"https://github.com/Neki/bomberman/pull/44.diff","patch_url":"https://github.com/Neki/bomberman/pull/44.patch","issue_url":"https://api.github.com/repos/Neki/bomberman/issues/44","number":44,"state":"open","locked":false,"title":"Detect client disconnect","user":{"login":"Neki","id":2143664,"avatar_url":"https://avatars.githubusercontent.com/u/2143664?v=2","gravatar_id":"","url":"https://api.github.com/users/Neki","html_url":"https://github.com/Neki","followers_url":"https://api.github.com/users/Neki/followers","following_url":"https://api.github.com/users/Neki/following{/other_user}","gists_url":"https://api.github.com/users/Neki/gists{/gist_id}","starred_url":"https://api.github.com/users/Neki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Neki/subscriptions","organizations_url":"https://api.github.com/users/Neki/orgs","repos_url":"https://api.github.com/users/Neki/repos","events_url":"https://api.github.com/users/Neki/events{/privacy}","received_events_url":"https://api.github.com/users/Neki/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-11-05T20:33:57Z","updated_at":"2014-11-06T21:29:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d1b77412e8a77025bf11d722925e6277a7116947","assignee":{"login":"Neki","id":2143664,"avatar_url":"https://avatars.githubusercontent.com/u/2143664?v=2","gravatar_id":"","url":"https://api.github.com/users/Neki","html_url":"https://github.com/Neki","followers_url":"https://api.github.com/users/Neki/followers","following_url":"https://api.github.com/users/Neki/following{/other_user}","gists_url":"https://api.github.com/users/Neki/gists{/gist_id}","starred_url":"https://api.github.com/users/Neki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Neki/subscriptions","organizations_url":"https://api.github.com/users/Neki/orgs","repos_url":"https://api.github.com/users/Neki/repos","events_url":"https://api.github.com/users/Neki/events{/privacy}","received_events_url":"https://api.github.com/users/Neki/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/Neki/bomberman/pulls/44/commits","review_comments_url":"https://api.github.com/repos/Neki/bomberman/pulls/44/comments","review_comment_url":"https://api.github.com/repos/Neki/bomberman/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Neki/bomberman/issues/44/comments","statuses_url":"https://api.github.com/repos/Neki/bomberman/statuses/5268e4310a152015a42f23158ab8437f709195d4","head":{"label":"Neki:topic/bf_detect_client_disconnect","ref":"topic/bf_detect_client_disconnect","sha":"5268e4310a152015a42f23158ab8437f709195d4","user":{"login":"Neki","id":2143664,"avatar_url":"https://avatars.githubusercontent.com/u/2143664?v=2","gravatar_id":"","url":"https://api.github.com/users/Neki","html_url":"https://github.com/Neki","followers_url":"https://api.github.com/users/Neki/followers","following_url":"https://api.github.com/users/Neki/following{/other_user}","gists_url":"https://api.github.com/users/Neki/gists{/gist_id}","starred_url":"https://api.github.com/users/Neki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Neki/subscriptions","organizations_url":"https://api.github.com/users/Neki/orgs","repos_url":"https://api.github.com/users/Neki/repos","events_url":"https://api.github.com/users/Neki/events{/privacy}","received_events_url":"https://api.github.com/users/Neki/received_events","type":"User","site_admin":false},"repo":{"id":24291681,"name":"bomberman","full_name":"Neki/bomberman","owner":{"login":"Neki","id":2143664,"avatar_url":"https://avatars.githubusercontent.com/u/2143664?v=2","gravatar_id":"","url":"https://api.github.com/users/Neki","html_url":"https://github.com/Neki","followers_url":"https://api.github.com/users/Neki/followers","following_url":"https://api.github.com/users/Neki/following{/other_user}","gists_url":"https://api.github.com/users/Neki/gists{/gist_id}","starred_url":"https://api.github.com/users/Neki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Neki/subscriptions","organizations_url":"https://api.github.com/users/Neki/orgs","repos_url":"https://api.github.com/users/Neki/repos","events_url":"https://api.github.com/users/Neki/events{/privacy}","received_events_url":"https://api.github.com/users/Neki/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Neki/bomberman","description":"Yet another bomberman clone (student project - written in C++)","fork":false,"url":"https://api.github.com/repos/Neki/bomberman","forks_url":"https://api.github.com/repos/Neki/bomberman/forks","keys_url":"https://api.github.com/repos/Neki/bomberman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Neki/bomberman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Neki/bomberman/teams","hooks_url":"https://api.github.com/repos/Neki/bomberman/hooks","issue_events_url":"https://api.github.com/repos/Neki/bomberman/issues/events{/number}","events_url":"https://api.github.com/repos/Neki/bomberman/events","assignees_url":"https://api.github.com/repos/Neki/bomberman/assignees{/user}","branches_url":"https://api.github.com/repos/Neki/bomberman/branches{/branch}","tags_url":"https://api.github.com/repos/Neki/bomberman/tags","blobs_url":"https://api.github.com/repos/Neki/bomberman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Neki/bomberman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Neki/bomberman/git/refs{/sha}","trees_url":"https://api.github.com/repos/Neki/bomberman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Neki/bomberman/statuses/{sha}","languages_url":"https://api.github.com/repos/Neki/bomberman/languages","stargazers_url":"https://api.github.com/repos/Neki/bomberman/stargazers","contributors_url":"https://api.github.com/repos/Neki/bomberman/contributors","subscribers_url":"https://api.github.com/repos/Neki/bomberman/subscribers","subscription_url":"https://api.github.com/repos/Neki/bomberman/subscription","commits_url":"https://api.github.com/repos/Neki/bomberman/commits{/sha}","git_commits_url":"https://api.github.com/repos/Neki/bomberman/git/commits{/sha}","comments_url":"https://api.github.com/repos/Neki/bomberman/comments{/number}","issue_comment_url":"https://api.github.com/repos/Neki/bomberman/issues/comments/{number}","contents_url":"https://api.github.com/repos/Neki/bomberman/contents/{+path}","compare_url":"https://api.github.com/repos/Neki/bomberman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Neki/bomberman/merges","archive_url":"https://api.github.com/repos/Neki/bomberman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Neki/bomberman/downloads","issues_url":"https://api.github.com/repos/Neki/bomberman/issues{/number}","pulls_url":"https://api.github.com/repos/Neki/bomberman/pulls{/number}","milestones_url":"https://api.github.com/repos/Neki/bomberman/milestones{/number}","notifications_url":"https://api.github.com/repos/Neki/bomberman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Neki/bomberman/labels{/name}","releases_url":"https://api.github.com/repos/Neki/bomberman/releases{/id}","created_at":"2014-09-21T13:29:14Z","updated_at":"2014-09-27T11:20:11Z","pushed_at":"2014-11-06T21:22:43Z","git_url":"git://github.com/Neki/bomberman.git","ssh_url":"git@github.com:Neki/bomberman.git","clone_url":"https://github.com/Neki/bomberman.git","svn_url":"https://github.com/Neki/bomberman","homepage":null,"size":5108,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"Neki:master","ref":"master","sha":"bab53eedae842a85d704c79274a6c9a9dd148e7c","user":{"login":"Neki","id":2143664,"avatar_url":"https://avatars.githubusercontent.com/u/2143664?v=2","gravatar_id":"","url":"https://api.github.com/users/Neki","html_url":"https://github.com/Neki","followers_url":"https://api.github.com/users/Neki/followers","following_url":"https://api.github.com/users/Neki/following{/other_user}","gists_url":"https://api.github.com/users/Neki/gists{/gist_id}","starred_url":"https://api.github.com/users/Neki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Neki/subscriptions","organizations_url":"https://api.github.com/users/Neki/orgs","repos_url":"https://api.github.com/users/Neki/repos","events_url":"https://api.github.com/users/Neki/events{/privacy}","received_events_url":"https://api.github.com/users/Neki/received_events","type":"User","site_admin":false},"repo":{"id":24291681,"name":"bomberman","full_name":"Neki/bomberman","owner":{"login":"Neki","id":2143664,"avatar_url":"https://avatars.githubusercontent.com/u/2143664?v=2","gravatar_id":"","url":"https://api.github.com/users/Neki","html_url":"https://github.com/Neki","followers_url":"https://api.github.com/users/Neki/followers","following_url":"https://api.github.com/users/Neki/following{/other_user}","gists_url":"https://api.github.com/users/Neki/gists{/gist_id}","starred_url":"https://api.github.com/users/Neki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Neki/subscriptions","organizations_url":"https://api.github.com/users/Neki/orgs","repos_url":"https://api.github.com/users/Neki/repos","events_url":"https://api.github.com/users/Neki/events{/privacy}","received_events_url":"https://api.github.com/users/Neki/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Neki/bomberman","description":"Yet another bomberman clone (student project - written in C++)","fork":false,"url":"https://api.github.com/repos/Neki/bomberman","forks_url":"https://api.github.com/repos/Neki/bomberman/forks","keys_url":"https://api.github.com/repos/Neki/bomberman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Neki/bomberman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Neki/bomberman/teams","hooks_url":"https://api.github.com/repos/Neki/bomberman/hooks","issue_events_url":"https://api.github.com/repos/Neki/bomberman/issues/events{/number}","events_url":"https://api.github.com/repos/Neki/bomberman/events","assignees_url":"https://api.github.com/repos/Neki/bomberman/assignees{/user}","branches_url":"https://api.github.com/repos/Neki/bomberman/branches{/branch}","tags_url":"https://api.github.com/repos/Neki/bomberman/tags","blobs_url":"https://api.github.com/repos/Neki/bomberman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Neki/bomberman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Neki/bomberman/git/refs{/sha}","trees_url":"https://api.github.com/repos/Neki/bomberman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Neki/bomberman/statuses/{sha}","languages_url":"https://api.github.com/repos/Neki/bomberman/languages","stargazers_url":"https://api.github.com/repos/Neki/bomberman/stargazers","contributors_url":"https://api.github.com/repos/Neki/bomberman/contributors","subscribers_url":"https://api.github.com/repos/Neki/bomberman/subscribers","subscription_url":"https://api.github.com/repos/Neki/bomberman/subscription","commits_url":"https://api.github.com/repos/Neki/bomberman/commits{/sha}","git_commits_url":"https://api.github.com/repos/Neki/bomberman/git/commits{/sha}","comments_url":"https://api.github.com/repos/Neki/bomberman/comments{/number}","issue_comment_url":"https://api.github.com/repos/Neki/bomberman/issues/comments/{number}","contents_url":"https://api.github.com/repos/Neki/bomberman/contents/{+path}","compare_url":"https://api.github.com/repos/Neki/bomberman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Neki/bomberman/merges","archive_url":"https://api.github.com/repos/Neki/bomberman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Neki/bomberman/downloads","issues_url":"https://api.github.com/repos/Neki/bomberman/issues{/number}","pulls_url":"https://api.github.com/repos/Neki/bomberman/pulls{/number}","milestones_url":"https://api.github.com/repos/Neki/bomberman/milestones{/number}","notifications_url":"https://api.github.com/repos/Neki/bomberman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Neki/bomberman/labels{/name}","releases_url":"https://api.github.com/repos/Neki/bomberman/releases{/id}","created_at":"2014-09-21T13:29:14Z","updated_at":"2014-09-27T11:20:11Z","pushed_at":"2014-11-06T21:22:43Z","git_url":"git://github.com/Neki/bomberman.git","ssh_url":"git@github.com:Neki/bomberman.git","clone_url":"https://github.com/Neki/bomberman.git","svn_url":"https://github.com/Neki/bomberman","homepage":null,"size":5108,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Neki/bomberman/pulls/44"},"html":{"href":"https://github.com/Neki/bomberman/pull/44"},"issue":{"href":"https://api.github.com/repos/Neki/bomberman/issues/44"},"comments":{"href":"https://api.github.com/repos/Neki/bomberman/issues/44/comments"},"review_comments":{"href":"https://api.github.com/repos/Neki/bomberman/pulls/44/comments"},"review_comment":{"href":"https://api.github.com/repos/Neki/bomberman/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Neki/bomberman/pulls/44/commits"},"statuses":{"href":"https://api.github.com/repos/Neki/bomberman/statuses/5268e4310a152015a42f23158ab8437f709195d4"}}}}