{"action":"created","comment":{"url":"https://api.github.com/repos/mumble-voip/mumble/pulls/comments/86691194","pull_request_review_id":7336932,"id":86691194,"diff_hunk":"@@ -392,6 +393,11 @@ void ServerHandler::sendPing() {\n \tif (!connection)\n \t\treturn;\n \n+\tif (iInFlightTCPPings >= g.s.iMaxInFlightTCPPings) {\n+\t\tserverConnectionClosed(QAbstractSocket::UnknownSocketError, tr(\"Server is not responding to TCP pings\"));","path":"src/mumble/ServerHandler.cpp","position":13,"original_position":13,"commit_id":"e5da2ba6daa7c77823c2a47adb6476c584992d0f","original_commit_id":"e5da2ba6daa7c77823c2a47adb6476c584992d0f","user":{"login":"mkrautz","id":36527,"avatar_url":"https://avatars.githubusercontent.com/u/36527?v=3","gravatar_id":"","url":"https://api.github.com/users/mkrautz","html_url":"https://github.com/mkrautz","followers_url":"https://api.github.com/users/mkrautz/followers","following_url":"https://api.github.com/users/mkrautz/following{/other_user}","gists_url":"https://api.github.com/users/mkrautz/gists{/gist_id}","starred_url":"https://api.github.com/users/mkrautz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkrautz/subscriptions","organizations_url":"https://api.github.com/users/mkrautz/orgs","repos_url":"https://api.github.com/users/mkrautz/repos","events_url":"https://api.github.com/users/mkrautz/events{/privacy}","received_events_url":"https://api.github.com/users/mkrautz/received_events","type":"User","site_admin":false},"body":"> [...] and custom even exit logic.\r\nFor the one case it is used (connected to server has no certificate) we don’t have to close Mumble, but just the Connection.\r\n\r\nHmm? This isn't ::exit(0), it's QThread::exit(), which makes the ServerHandler thread terminate.","created_at":"2016-11-06T17:20:05Z","updated_at":"2016-11-06T17:20:05Z","html_url":"https://github.com/mumble-voip/mumble/pull/2622#discussion_r86691194","pull_request_url":"https://api.github.com/repos/mumble-voip/mumble/pulls/2622","_links":{"self":{"href":"https://api.github.com/repos/mumble-voip/mumble/pulls/comments/86691194"},"html":{"href":"https://github.com/mumble-voip/mumble/pull/2622#discussion_r86691194"},"pull_request":{"href":"https://api.github.com/repos/mumble-voip/mumble/pulls/2622"}}},"pull_request":{"url":"https://api.github.com/repos/mumble-voip/mumble/pulls/2622","id":92458213,"html_url":"https://github.com/mumble-voip/mumble/pull/2622","diff_url":"https://github.com/mumble-voip/mumble/pull/2622.diff","patch_url":"https://github.com/mumble-voip/mumble/pull/2622.patch","issue_url":"https://api.github.com/repos/mumble-voip/mumble/issues/2622","number":2622,"state":"open","locked":false,"title":"ServerHandler: reconnect to the server if it is not responding to TCP pings","user":{"login":"mkrautz","id":36527,"avatar_url":"https://avatars.githubusercontent.com/u/36527?v=3","gravatar_id":"","url":"https://api.github.com/users/mkrautz","html_url":"https://github.com/mkrautz","followers_url":"https://api.github.com/users/mkrautz/followers","following_url":"https://api.github.com/users/mkrautz/following{/other_user}","gists_url":"https://api.github.com/users/mkrautz/gists{/gist_id}","starred_url":"https://api.github.com/users/mkrautz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkrautz/subscriptions","organizations_url":"https://api.github.com/users/mkrautz/orgs","repos_url":"https://api.github.com/users/mkrautz/repos","events_url":"https://api.github.com/users/mkrautz/events{/privacy}","received_events_url":"https://api.github.com/users/mkrautz/received_events","type":"User","site_admin":false},"body":"This is implemened via a 'max in-flight TCP pings' counter, and\r\na rule for how many in-flight TCP pings there can be at one\r\npoint in time. (The default being 2, which means a client will\r\ndisconnect from a server if it takes the server more than 10\r\nseconds to reply to a single ping message, given that Mumble\r\nsends ping messages every 5 seconds.)\r\n\r\nThe idea is simple: ServerHandler keeps a counter of the number\r\nof TCP pings it has sent, but has not yet received a response for.\r\n\r\nWhen ServerHandler sends a ping, it increments the counter.\r\n\r\nOnce a pong or response for the ping has been received, it\r\ndecrements the counter.\r\n\r\nBut most importantly, ServerHandler now checks the amount\r\nof in-flight TCP pings before it sends a new ping message.\r\nIf the counter exceeds the maximum number of allowed in-flight\r\nTCP pings, it disconects from the server, allowing the client\r\nto try to re-establish the connection.\r\n\r\nOne scenario where this is useful, is for IPv6 privacy addresses.\r\nPrivacy addresses are temporary, often with a default expiry time\r\nof 4 hours. After this time, the address is removed from the system,\r\nand TCP connections using that address will be terminated.\r\n(See for example mumble-voip/mumble#1377)\r\n\r\nOne would naturally expect it to be possible to observe the fact\r\nthat the TCP connection has been terminated, but that doesn't seem\r\nto be what's happening. At times, I've observed it taking up\r\nto 30 minutes until my client realized that the connection wasn't\r\nthere anymore. (However, the server that I was connected to\r\nfound out immediately, and disconneted me.)\r\n\r\nBecause of this behavior, this TCP ping check was implemented.","created_at":"2016-11-05T16:17:19Z","updated_at":"2016-11-06T17:20:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"de2c1e4088f0e07c8b2152d6a4e9048b6c9d9663","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mumble-voip/mumble/pulls/2622/commits","review_comments_url":"https://api.github.com/repos/mumble-voip/mumble/pulls/2622/comments","review_comment_url":"https://api.github.com/repos/mumble-voip/mumble/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mumble-voip/mumble/issues/2622/comments","statuses_url":"https://api.github.com/repos/mumble-voip/mumble/statuses/e5da2ba6daa7c77823c2a47adb6476c584992d0f","head":{"label":"mkrautz:max-in-flight-tcp-pings","ref":"max-in-flight-tcp-pings","sha":"e5da2ba6daa7c77823c2a47adb6476c584992d0f","user":{"login":"mkrautz","id":36527,"avatar_url":"https://avatars.githubusercontent.com/u/36527?v=3","gravatar_id":"","url":"https://api.github.com/users/mkrautz","html_url":"https://github.com/mkrautz","followers_url":"https://api.github.com/users/mkrautz/followers","following_url":"https://api.github.com/users/mkrautz/following{/other_user}","gists_url":"https://api.github.com/users/mkrautz/gists{/gist_id}","starred_url":"https://api.github.com/users/mkrautz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkrautz/subscriptions","organizations_url":"https://api.github.com/users/mkrautz/orgs","repos_url":"https://api.github.com/users/mkrautz/repos","events_url":"https://api.github.com/users/mkrautz/events{/privacy}","received_events_url":"https://api.github.com/users/mkrautz/received_events","type":"User","site_admin":false},"repo":{"id":3210109,"name":"mumble","full_name":"mkrautz/mumble","owner":{"login":"mkrautz","id":36527,"avatar_url":"https://avatars.githubusercontent.com/u/36527?v=3","gravatar_id":"","url":"https://api.github.com/users/mkrautz","html_url":"https://github.com/mkrautz","followers_url":"https://api.github.com/users/mkrautz/followers","following_url":"https://api.github.com/users/mkrautz/following{/other_user}","gists_url":"https://api.github.com/users/mkrautz/gists{/gist_id}","starred_url":"https://api.github.com/users/mkrautz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkrautz/subscriptions","organizations_url":"https://api.github.com/users/mkrautz/orgs","repos_url":"https://api.github.com/users/mkrautz/repos","events_url":"https://api.github.com/users/mkrautz/events{/privacy}","received_events_url":"https://api.github.com/users/mkrautz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mkrautz/mumble","description":"Mumble VoIP Client/Server","fork":true,"url":"https://api.github.com/repos/mkrautz/mumble","forks_url":"https://api.github.com/repos/mkrautz/mumble/forks","keys_url":"https://api.github.com/repos/mkrautz/mumble/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mkrautz/mumble/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mkrautz/mumble/teams","hooks_url":"https://api.github.com/repos/mkrautz/mumble/hooks","issue_events_url":"https://api.github.com/repos/mkrautz/mumble/issues/events{/number}","events_url":"https://api.github.com/repos/mkrautz/mumble/events","assignees_url":"https://api.github.com/repos/mkrautz/mumble/assignees{/user}","branches_url":"https://api.github.com/repos/mkrautz/mumble/branches{/branch}","tags_url":"https://api.github.com/repos/mkrautz/mumble/tags","blobs_url":"https://api.github.com/repos/mkrautz/mumble/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mkrautz/mumble/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mkrautz/mumble/git/refs{/sha}","trees_url":"https://api.github.com/repos/mkrautz/mumble/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mkrautz/mumble/statuses/{sha}","languages_url":"https://api.github.com/repos/mkrautz/mumble/languages","stargazers_url":"https://api.github.com/repos/mkrautz/mumble/stargazers","contributors_url":"https://api.github.com/repos/mkrautz/mumble/contributors","subscribers_url":"https://api.github.com/repos/mkrautz/mumble/subscribers","subscription_url":"https://api.github.com/repos/mkrautz/mumble/subscription","commits_url":"https://api.github.com/repos/mkrautz/mumble/commits{/sha}","git_commits_url":"https://api.github.com/repos/mkrautz/mumble/git/commits{/sha}","comments_url":"https://api.github.com/repos/mkrautz/mumble/comments{/number}","issue_comment_url":"https://api.github.com/repos/mkrautz/mumble/issues/comments{/number}","contents_url":"https://api.github.com/repos/mkrautz/mumble/contents/{+path}","compare_url":"https://api.github.com/repos/mkrautz/mumble/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mkrautz/mumble/merges","archive_url":"https://api.github.com/repos/mkrautz/mumble/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mkrautz/mumble/downloads","issues_url":"https://api.github.com/repos/mkrautz/mumble/issues{/number}","pulls_url":"https://api.github.com/repos/mkrautz/mumble/pulls{/number}","milestones_url":"https://api.github.com/repos/mkrautz/mumble/milestones{/number}","notifications_url":"https://api.github.com/repos/mkrautz/mumble/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mkrautz/mumble/labels{/name}","releases_url":"https://api.github.com/repos/mkrautz/mumble/releases{/id}","deployments_url":"https://api.github.com/repos/mkrautz/mumble/deployments","created_at":"2012-01-18T16:24:06Z","updated_at":"2016-09-22T18:48:45Z","pushed_at":"2016-11-06T16:12:51Z","git_url":"git://github.com/mkrautz/mumble.git","ssh_url":"git@github.com:mkrautz/mumble.git","clone_url":"https://github.com/mkrautz/mumble.git","svn_url":"https://github.com/mkrautz/mumble","homepage":"http://mumble.info","size":36325,"stargazers_count":6,"watchers_count":6,"language":"TypeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":6,"default_branch":"master"}},"base":{"label":"mumble-voip:master","ref":"master","sha":"b595d6506ae85546a84fddf6179f7dace4353d9c","user":{"login":"mumble-voip","id":639008,"avatar_url":"https://avatars.githubusercontent.com/u/639008?v=3","gravatar_id":"","url":"https://api.github.com/users/mumble-voip","html_url":"https://github.com/mumble-voip","followers_url":"https://api.github.com/users/mumble-voip/followers","following_url":"https://api.github.com/users/mumble-voip/following{/other_user}","gists_url":"https://api.github.com/users/mumble-voip/gists{/gist_id}","starred_url":"https://api.github.com/users/mumble-voip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mumble-voip/subscriptions","organizations_url":"https://api.github.com/users/mumble-voip/orgs","repos_url":"https://api.github.com/users/mumble-voip/repos","events_url":"https://api.github.com/users/mumble-voip/events{/privacy}","received_events_url":"https://api.github.com/users/mumble-voip/received_events","type":"Organization","site_admin":false},"repo":{"id":1413319,"name":"mumble","full_name":"mumble-voip/mumble","owner":{"login":"mumble-voip","id":639008,"avatar_url":"https://avatars.githubusercontent.com/u/639008?v=3","gravatar_id":"","url":"https://api.github.com/users/mumble-voip","html_url":"https://github.com/mumble-voip","followers_url":"https://api.github.com/users/mumble-voip/followers","following_url":"https://api.github.com/users/mumble-voip/following{/other_user}","gists_url":"https://api.github.com/users/mumble-voip/gists{/gist_id}","starred_url":"https://api.github.com/users/mumble-voip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mumble-voip/subscriptions","organizations_url":"https://api.github.com/users/mumble-voip/orgs","repos_url":"https://api.github.com/users/mumble-voip/repos","events_url":"https://api.github.com/users/mumble-voip/events{/privacy}","received_events_url":"https://api.github.com/users/mumble-voip/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mumble-voip/mumble","description":"Mumble VoIP Client/Server","fork":false,"url":"https://api.github.com/repos/mumble-voip/mumble","forks_url":"https://api.github.com/repos/mumble-voip/mumble/forks","keys_url":"https://api.github.com/repos/mumble-voip/mumble/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mumble-voip/mumble/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mumble-voip/mumble/teams","hooks_url":"https://api.github.com/repos/mumble-voip/mumble/hooks","issue_events_url":"https://api.github.com/repos/mumble-voip/mumble/issues/events{/number}","events_url":"https://api.github.com/repos/mumble-voip/mumble/events","assignees_url":"https://api.github.com/repos/mumble-voip/mumble/assignees{/user}","branches_url":"https://api.github.com/repos/mumble-voip/mumble/branches{/branch}","tags_url":"https://api.github.com/repos/mumble-voip/mumble/tags","blobs_url":"https://api.github.com/repos/mumble-voip/mumble/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mumble-voip/mumble/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mumble-voip/mumble/git/refs{/sha}","trees_url":"https://api.github.com/repos/mumble-voip/mumble/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mumble-voip/mumble/statuses/{sha}","languages_url":"https://api.github.com/repos/mumble-voip/mumble/languages","stargazers_url":"https://api.github.com/repos/mumble-voip/mumble/stargazers","contributors_url":"https://api.github.com/repos/mumble-voip/mumble/contributors","subscribers_url":"https://api.github.com/repos/mumble-voip/mumble/subscribers","subscription_url":"https://api.github.com/repos/mumble-voip/mumble/subscription","commits_url":"https://api.github.com/repos/mumble-voip/mumble/commits{/sha}","git_commits_url":"https://api.github.com/repos/mumble-voip/mumble/git/commits{/sha}","comments_url":"https://api.github.com/repos/mumble-voip/mumble/comments{/number}","issue_comment_url":"https://api.github.com/repos/mumble-voip/mumble/issues/comments{/number}","contents_url":"https://api.github.com/repos/mumble-voip/mumble/contents/{+path}","compare_url":"https://api.github.com/repos/mumble-voip/mumble/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mumble-voip/mumble/merges","archive_url":"https://api.github.com/repos/mumble-voip/mumble/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mumble-voip/mumble/downloads","issues_url":"https://api.github.com/repos/mumble-voip/mumble/issues{/number}","pulls_url":"https://api.github.com/repos/mumble-voip/mumble/pulls{/number}","milestones_url":"https://api.github.com/repos/mumble-voip/mumble/milestones{/number}","notifications_url":"https://api.github.com/repos/mumble-voip/mumble/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mumble-voip/mumble/labels{/name}","releases_url":"https://api.github.com/repos/mumble-voip/mumble/releases{/id}","deployments_url":"https://api.github.com/repos/mumble-voip/mumble/deployments","created_at":"2011-02-26T01:30:08Z","updated_at":"2016-11-05T10:03:10Z","pushed_at":"2016-11-06T16:12:52Z","git_url":"git://github.com/mumble-voip/mumble.git","ssh_url":"git@github.com:mumble-voip/mumble.git","clone_url":"https://github.com/mumble-voip/mumble.git","svn_url":"https://github.com/mumble-voip/mumble","homepage":"https://www.mumble.info","size":43492,"stargazers_count":1455,"watchers_count":1455,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":436,"mirror_url":null,"open_issues_count":583,"forks":436,"open_issues":583,"watchers":1455,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mumble-voip/mumble/pulls/2622"},"html":{"href":"https://github.com/mumble-voip/mumble/pull/2622"},"issue":{"href":"https://api.github.com/repos/mumble-voip/mumble/issues/2622"},"comments":{"href":"https://api.github.com/repos/mumble-voip/mumble/issues/2622/comments"},"review_comments":{"href":"https://api.github.com/repos/mumble-voip/mumble/pulls/2622/comments"},"review_comment":{"href":"https://api.github.com/repos/mumble-voip/mumble/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mumble-voip/mumble/pulls/2622/commits"},"statuses":{"href":"https://api.github.com/repos/mumble-voip/mumble/statuses/e5da2ba6daa7c77823c2a47adb6476c584992d0f"}}}}
{"actor":{"display_login":"mkrautz"}}