{"action":"created","issue":{"url":"https://api.github.com/repos/uProxy/uproxy/issues/1287","labels_url":"https://api.github.com/repos/uProxy/uproxy/issues/1287/labels{/name}","comments_url":"https://api.github.com/repos/uProxy/uproxy/issues/1287/comments","events_url":"https://api.github.com/repos/uProxy/uproxy/issues/1287/events","html_url":"https://github.com/uProxy/uproxy/pull/1287","id":68705980,"number":1287,"title":"Use socksToRtc onceStopping_ rather than stopped to get around Firefox stop-proxying bug","user":{"login":"dborkan","id":6494307,"avatar_url":"https://avatars.githubusercontent.com/u/6494307?v=3","gravatar_id":"","url":"https://api.github.com/users/dborkan","html_url":"https://github.com/dborkan","followers_url":"https://api.github.com/users/dborkan/followers","following_url":"https://api.github.com/users/dborkan/following{/other_user}","gists_url":"https://api.github.com/users/dborkan/gists{/gist_id}","starred_url":"https://api.github.com/users/dborkan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dborkan/subscriptions","organizations_url":"https://api.github.com/users/dborkan/orgs","repos_url":"https://api.github.com/users/dborkan/repos","events_url":"https://api.github.com/users/dborkan/events{/privacy}","received_events_url":"https://api.github.com/users/dborkan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"jpevarnek","id":902894,"avatar_url":"https://avatars.githubusercontent.com/u/902894?v=3","gravatar_id":"","url":"https://api.github.com/users/jpevarnek","html_url":"https://github.com/jpevarnek","followers_url":"https://api.github.com/users/jpevarnek/followers","following_url":"https://api.github.com/users/jpevarnek/following{/other_user}","gists_url":"https://api.github.com/users/jpevarnek/gists{/gist_id}","starred_url":"https://api.github.com/users/jpevarnek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpevarnek/subscriptions","organizations_url":"https://api.github.com/users/jpevarnek/orgs","repos_url":"https://api.github.com/users/jpevarnek/repos","events_url":"https://api.github.com/users/jpevarnek/events{/privacy}","received_events_url":"https://api.github.com/users/jpevarnek/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-04-15T15:04:47Z","updated_at":"2015-04-15T15:38:55Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/uProxy/uproxy/pulls/1287","html_url":"https://github.com/uProxy/uproxy/pull/1287","diff_url":"https://github.com/uProxy/uproxy/pull/1287.diff","patch_url":"https://github.com/uProxy/uproxy/pull/1287.patch"},"body":"Temporary fix for https://github.com/uProxy/uproxy/issues/1264\r\n\r\nCurrently on Firefox, the socksToRtc 'stopped' event never fires, due to some issues closing TCP sockets.  uProxy core doesn't actually care that these sockets haven't been closed, and we need to know the proxying is stopped so that we can properly clean up (remove browser socks5 proxy settings).  We can do this by connecting to the 'onceStopping_' promise, which is fulfilled as soon as stopping begins, instead of the 'stopped' callback which only gets called when all sockets have been closed (which never happens in FF).\r\n\r\nLong term fix for this is to fix underlying uproxy-networking / socket issues in Firefox.\r\n\r\nTested in Chrome (no change), Firefox, updated grunt test\n\n<!-- Reviewable:start -->\n[<img src=\"https://reviewable.io/review_button.png\" height=40 alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/uproxy/uproxy/1287)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/uProxy/uproxy/issues/comments/93454027","html_url":"https://github.com/uProxy/uproxy/pull/1287#issuecomment-93454027","issue_url":"https://api.github.com/repos/uProxy/uproxy/issues/1287","id":93454027,"user":{"login":"jpevarnek","id":902894,"avatar_url":"https://avatars.githubusercontent.com/u/902894?v=3","gravatar_id":"","url":"https://api.github.com/users/jpevarnek","html_url":"https://github.com/jpevarnek","followers_url":"https://api.github.com/users/jpevarnek/followers","following_url":"https://api.github.com/users/jpevarnek/following{/other_user}","gists_url":"https://api.github.com/users/jpevarnek/gists{/gist_id}","starred_url":"https://api.github.com/users/jpevarnek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpevarnek/subscriptions","organizations_url":"https://api.github.com/users/jpevarnek/orgs","repos_url":"https://api.github.com/users/jpevarnek/repos","events_url":"https://api.github.com/users/jpevarnek/events{/privacy}","received_events_url":"https://api.github.com/users/jpevarnek/received_events","type":"User","site_admin":false},"created_at":"2015-04-15T15:38:55Z","updated_at":"2015-04-15T15:38:55Z","body":"\n\n\n\nReviewed files:\n- src/generic_core/remote-connection.ts @ r1\n- src/generic_core/remote-instance.spec.ts @ r1\n- src/mocks/socks-to-rtc.ts @ r1\n\n---\n\n<sup>**[src/generic_core/remote-connection.ts, line 172 \\[r1\\]](https://reviewable.io:443/reviews/uproxy/uproxy/1287#-Jmxibh2DCZWDAOrx6jE)** ([raw file](https://github.com/uproxy/uproxy/blob/3a602ed44dd2e82f9da4b673da9c528bcbab6c73/src/generic_core/remote-connection.ts#L172)):</sup>\n`log.error`\n\n---\n\n<sup>**[src/generic_core/remote-instance.spec.ts, line 145 \\[r1\\]](https://reviewable.io:443/reviews/uproxy/uproxy/1287#-Jmxifkz6X2AQF87-v8C)** ([raw file](https://github.com/uproxy/uproxy/blob/3a602ed44dd2e82f9da4b673da9c528bcbab6c73/src/generic_core/remote-instance.spec.ts#L145)):</sup>\nCan you add TODOs to remove these once we are no longer doing the hack?\n\n---\n\n<sup>**[src/generic_core/remote-instance.spec.ts, line 214 \\[r1\\]](https://reviewable.io:443/reviews/uproxy/uproxy/1287#-Jmxiq5dJ6rcRQxMzNQG)** ([raw file](https://github.com/uproxy/uproxy/blob/3a602ed44dd2e82f9da4b673da9c528bcbab6c73/src/generic_core/remote-instance.spec.ts#L214)):</sup>\ncomment\n\n---\n\n<sup>**[src/mocks/socks-to-rtc.ts, line 24 \\[r1\\]](https://reviewable.io:443/reviews/uproxy/uproxy/1287#-Jmxip-8mRI0VBBDaPpr)** ([raw file](https://github.com/uproxy/uproxy/blob/3a602ed44dd2e82f9da4b673da9c528bcbab6c73/src/mocks/socks-to-rtc.ts#L24)):</sup>\ncomment\n\n---\n\n\n---\n\nComments from the [review on Reviewable.io](https://reviewable.io:443/reviews/uproxy/uproxy/1287)\n<!-- Sent from Reviewable.io -->\n"}}