{"action":"created","issue":{"url":"https://api.github.com/repos/rstudio/rstudio/issues/2609","repository_url":"https://api.github.com/repos/rstudio/rstudio","labels_url":"https://api.github.com/repos/rstudio/rstudio/issues/2609/labels{/name}","comments_url":"https://api.github.com/repos/rstudio/rstudio/issues/2609/comments","events_url":"https://api.github.com/repos/rstudio/rstudio/issues/2609/events","html_url":"https://github.com/rstudio/rstudio/pull/2609","id":312144661,"number":2609,"title":"Bugfix/websocket fallback rpc","user":{"login":"gtritchie","id":10569626,"avatar_url":"https://avatars3.githubusercontent.com/u/10569626?v=4","gravatar_id":"","url":"https://api.github.com/users/gtritchie","html_url":"https://github.com/gtritchie","followers_url":"https://api.github.com/users/gtritchie/followers","following_url":"https://api.github.com/users/gtritchie/following{/other_user}","gists_url":"https://api.github.com/users/gtritchie/gists{/gist_id}","starred_url":"https://api.github.com/users/gtritchie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gtritchie/subscriptions","organizations_url":"https://api.github.com/users/gtritchie/orgs","repos_url":"https://api.github.com/users/gtritchie/repos","events_url":"https://api.github.com/users/gtritchie/events{/privacy}","received_events_url":"https://api.github.com/users/gtritchie/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-04-06T23:04:25Z","updated_at":"2018-04-07T16:32:22Z","closed_at":"2018-04-06T23:45:50Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/rstudio/rstudio/pulls/2609","html_url":"https://github.com/rstudio/rstudio/pull/2609","diff_url":"https://github.com/rstudio/rstudio/pull/2609.diff","patch_url":"https://github.com/rstudio/rstudio/pull/2609.patch"},"body":"Fixes #2207 \r\n\r\n## Before\r\nIn some environments the attempt to connect terminal via websockets can take a long time to fail (have seen it take over two minutes). During that time there is nothing shown in the terminal UI, so user has no idea what's going on.\r\n\r\nThe code is then supposed to fall back to HTTP-based RPC for the terminal if WebSockets fails, but that also had a problem that usually resulted in no terminal (the one being loaded via RPC was instantly killed).\r\n\r\n## After\r\nNow there is a 5 second timeout; if websocket connection doesn't happen in 5 seconds, the terminal will switch to HTTP (fixed the bug that was preventing that), then show a message telling the user that WebSockets failed, and it switched to HTTP, and terminal performance will be reduced. Mentions the Tools / Global Options / Terminal option for turning off WebSockets to avoid the delay and the message.\r\n\r\nAlso show a message now if the fallback to RPC also fails, instead of just having a blank terminal."},"comment":{"url":"https://api.github.com/repos/rstudio/rstudio/issues/comments/379482100","html_url":"https://github.com/rstudio/rstudio/pull/2609#issuecomment-379482100","issue_url":"https://api.github.com/repos/rstudio/rstudio/issues/2609","id":379482100,"user":{"login":"jjallaire","id":104391,"avatar_url":"https://avatars2.githubusercontent.com/u/104391?v=4","gravatar_id":"","url":"https://api.github.com/users/jjallaire","html_url":"https://github.com/jjallaire","followers_url":"https://api.github.com/users/jjallaire/followers","following_url":"https://api.github.com/users/jjallaire/following{/other_user}","gists_url":"https://api.github.com/users/jjallaire/gists{/gist_id}","starred_url":"https://api.github.com/users/jjallaire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjallaire/subscriptions","organizations_url":"https://api.github.com/users/jjallaire/orgs","repos_url":"https://api.github.com/users/jjallaire/repos","events_url":"https://api.github.com/users/jjallaire/events{/privacy}","received_events_url":"https://api.github.com/users/jjallaire/received_events","type":"User","site_admin":false},"created_at":"2018-04-07T16:32:22Z","updated_at":"2018-04-07T16:32:22Z","author_association":"OWNER","body":"That's a good question. On RStudio Server it seems like the failure is more likely to be transient (i.e. only for a given remote access scenario) whereas on the desktop it seems more likely to be permanent. So maybe distinct behavior depending on which version they are running?\r\n\r\nAlso, do you think you could narrow it to 3 seconds or would that risk false negatives?"}}
{"actor":{"display_login":"jjallaire"}}