{"action":"created","comment":{"url":"https://api.github.com/repos/rstudio/shiny-server/pulls/comments/47403090","id":47403090,"diff_hunk":"@@ -362,22 +544,22 @@\n \n     //var relURL = getRelativePath(parentURL, this.url)\n     \n-    this.conn.send(formatOpenEvent(this.id, this.url));\n+    this._owner.send(formatOpenEvent(this.id, this.url));\n     this.onopen();\n   };\n   MultiplexClientChannel.prototype.send = function(data) {\n     if (this.readyState === 0)\n       throw new Error(\"Invalid state: can't send when readyState is 0\");\n     if (this.readyState === 1)\n-      this.conn.send(formatMessage(this.id, data));\n+      this._owner.send(formatMessage(this.id, data));\n   };\n   MultiplexClientChannel.prototype.close = function(code, reason) {\n     if (this.readyState >= 2)\n       return;\n     debug(\"Close channel \" + this.id);\n-    if (this.conn.readyState === 1) {\n+    if (this._owner.getConn().readyState === 1) {","path":"assets/shiny-server.js","position":338,"original_position":327,"commit_id":"4d6a527b016be6293b7403e84ba6f068869cce18","original_commit_id":"331cc5d67d9961417ae172a33069d4a02298cc2f","user":{"login":"trestletech","id":1593639,"avatar_url":"https://avatars.githubusercontent.com/u/1593639?v=3","gravatar_id":"","url":"https://api.github.com/users/trestletech","html_url":"https://github.com/trestletech","followers_url":"https://api.github.com/users/trestletech/followers","following_url":"https://api.github.com/users/trestletech/following{/other_user}","gists_url":"https://api.github.com/users/trestletech/gists{/gist_id}","starred_url":"https://api.github.com/users/trestletech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trestletech/subscriptions","organizations_url":"https://api.github.com/users/trestletech/orgs","repos_url":"https://api.github.com/users/trestletech/repos","events_url":"https://api.github.com/users/trestletech/events{/privacy}","received_events_url":"https://api.github.com/users/trestletech/received_events","type":"User","site_admin":false},"body":"Preserving existing behavior on the multiplex client channels. Not comfortable enough with the multiplex stuff myself to refactor this...","created_at":"2015-12-11T20:45:40Z","updated_at":"2015-12-11T20:45:40Z","html_url":"https://github.com/rstudio/shiny-server/pull/168#discussion_r47403090","pull_request_url":"https://api.github.com/repos/rstudio/shiny-server/pulls/168","_links":{"self":{"href":"https://api.github.com/repos/rstudio/shiny-server/pulls/comments/47403090"},"html":{"href":"https://github.com/rstudio/shiny-server/pull/168#discussion_r47403090"},"pull_request":{"href":"https://api.github.com/repos/rstudio/shiny-server/pulls/168"}}},"pull_request":{"url":"https://api.github.com/repos/rstudio/shiny-server/pulls/168","id":53325034,"html_url":"https://github.com/rstudio/shiny-server/pull/168","diff_url":"https://github.com/rstudio/shiny-server/pull/168.diff","patch_url":"https://github.com/rstudio/shiny-server/pull/168.patch","issue_url":"https://api.github.com/repos/rstudio/shiny-server/issues/168","number":168,"state":"open","locked":false,"title":"Add reconnect capabilities","user":{"login":"trestletech","id":1593639,"avatar_url":"https://avatars.githubusercontent.com/u/1593639?v=3","gravatar_id":"","url":"https://api.github.com/users/trestletech","html_url":"https://github.com/trestletech","followers_url":"https://api.github.com/users/trestletech/followers","following_url":"https://api.github.com/users/trestletech/following{/other_user}","gists_url":"https://api.github.com/users/trestletech/gists{/gist_id}","starred_url":"https://api.github.com/users/trestletech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trestletech/subscriptions","organizations_url":"https://api.github.com/users/trestletech/orgs","repos_url":"https://api.github.com/users/trestletech/repos","events_url":"https://api.github.com/users/trestletech/events{/privacy}","received_events_url":"https://api.github.com/users/trestletech/received_events","type":"User","site_admin":false},"body":"Behavior:\r\n\r\n - If `disable_reconnect true` is set in the config, then the behavior mimics what we have today, with the subtle exception that Shiny Server, instead of Shiny, is producing the grey screen on disconnect (with slightly different mechanics). By default, the feature is enabled, though.\r\n - If we have an unexpected disconnect, we'll present they grey screen with a dialog at the top counting down from 15 seconds. The R session will stay active for this same amount of time. If the user clicks \"reconnect\" within those 15 seconds, they'll be reattached to their original session with no lost state.\r\n - After 15 seconds with no user intervention, we'll close the connection to the Shiny process, and the UI will no longer offer to \"reconnect\" but rather will say that you've been disconnected and the button will say \"Reload\", which just refreshes the page and starts a new session.\r\n - If we reconnect to a server who has no knowledge of the ID we provide (i.e. if the server was restarted), then we'll immediately get an alert explaining that our session has been lost and we'll see the \"Reload\" button.\r\n - If disconnected cleanly (i.e. the server or client called a `conn.close()`) then we immediately present the \"Reload\" option, skipping over the whole \"reconnect\" business.\r\n\r\nFeedback on dialog UI and text especially welcome.\r\n\r\nCC @jcheng5 @aronatkins \r\n\r\nP.S. My editor was doing weird things with the JS. I may do a grant re-indent before I merge, but I didn't want to confuse the diff.","created_at":"2015-12-10T22:11:24Z","updated_at":"2015-12-11T20:45:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8ab55c032069bf43f51e8b5492693f93a8fd855b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rstudio/shiny-server/pulls/168/commits","review_comments_url":"https://api.github.com/repos/rstudio/shiny-server/pulls/168/comments","review_comment_url":"https://api.github.com/repos/rstudio/shiny-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rstudio/shiny-server/issues/168/comments","statuses_url":"https://api.github.com/repos/rstudio/shiny-server/statuses/4d6a527b016be6293b7403e84ba6f068869cce18","head":{"label":"rstudio:jeff/reconnect","ref":"jeff/reconnect","sha":"4d6a527b016be6293b7403e84ba6f068869cce18","user":{"login":"rstudio","id":513560,"avatar_url":"https://avatars.githubusercontent.com/u/513560?v=3","gravatar_id":"","url":"https://api.github.com/users/rstudio","html_url":"https://github.com/rstudio","followers_url":"https://api.github.com/users/rstudio/followers","following_url":"https://api.github.com/users/rstudio/following{/other_user}","gists_url":"https://api.github.com/users/rstudio/gists{/gist_id}","starred_url":"https://api.github.com/users/rstudio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rstudio/subscriptions","organizations_url":"https://api.github.com/users/rstudio/orgs","repos_url":"https://api.github.com/users/rstudio/repos","events_url":"https://api.github.com/users/rstudio/events{/privacy}","received_events_url":"https://api.github.com/users/rstudio/received_events","type":"Organization","site_admin":false},"repo":{"id":5513742,"name":"shiny-server","full_name":"rstudio/shiny-server","owner":{"login":"rstudio","id":513560,"avatar_url":"https://avatars.githubusercontent.com/u/513560?v=3","gravatar_id":"","url":"https://api.github.com/users/rstudio","html_url":"https://github.com/rstudio","followers_url":"https://api.github.com/users/rstudio/followers","following_url":"https://api.github.com/users/rstudio/following{/other_user}","gists_url":"https://api.github.com/users/rstudio/gists{/gist_id}","starred_url":"https://api.github.com/users/rstudio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rstudio/subscriptions","organizations_url":"https://api.github.com/users/rstudio/orgs","repos_url":"https://api.github.com/users/rstudio/repos","events_url":"https://api.github.com/users/rstudio/events{/privacy}","received_events_url":"https://api.github.com/users/rstudio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rstudio/shiny-server","description":"Host Shiny applications over the web.","fork":false,"url":"https://api.github.com/repos/rstudio/shiny-server","forks_url":"https://api.github.com/repos/rstudio/shiny-server/forks","keys_url":"https://api.github.com/repos/rstudio/shiny-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rstudio/shiny-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rstudio/shiny-server/teams","hooks_url":"https://api.github.com/repos/rstudio/shiny-server/hooks","issue_events_url":"https://api.github.com/repos/rstudio/shiny-server/issues/events{/number}","events_url":"https://api.github.com/repos/rstudio/shiny-server/events","assignees_url":"https://api.github.com/repos/rstudio/shiny-server/assignees{/user}","branches_url":"https://api.github.com/repos/rstudio/shiny-server/branches{/branch}","tags_url":"https://api.github.com/repos/rstudio/shiny-server/tags","blobs_url":"https://api.github.com/repos/rstudio/shiny-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rstudio/shiny-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rstudio/shiny-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/rstudio/shiny-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rstudio/shiny-server/statuses/{sha}","languages_url":"https://api.github.com/repos/rstudio/shiny-server/languages","stargazers_url":"https://api.github.com/repos/rstudio/shiny-server/stargazers","contributors_url":"https://api.github.com/repos/rstudio/shiny-server/contributors","subscribers_url":"https://api.github.com/repos/rstudio/shiny-server/subscribers","subscription_url":"https://api.github.com/repos/rstudio/shiny-server/subscription","commits_url":"https://api.github.com/repos/rstudio/shiny-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/rstudio/shiny-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/rstudio/shiny-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/rstudio/shiny-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/rstudio/shiny-server/contents/{+path}","compare_url":"https://api.github.com/repos/rstudio/shiny-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rstudio/shiny-server/merges","archive_url":"https://api.github.com/repos/rstudio/shiny-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rstudio/shiny-server/downloads","issues_url":"https://api.github.com/repos/rstudio/shiny-server/issues{/number}","pulls_url":"https://api.github.com/repos/rstudio/shiny-server/pulls{/number}","milestones_url":"https://api.github.com/repos/rstudio/shiny-server/milestones{/number}","notifications_url":"https://api.github.com/repos/rstudio/shiny-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rstudio/shiny-server/labels{/name}","releases_url":"https://api.github.com/repos/rstudio/shiny-server/releases{/id}","created_at":"2012-08-22T18:42:22Z","updated_at":"2015-12-09T09:47:35Z","pushed_at":"2015-12-11T20:32:35Z","git_url":"git://github.com/rstudio/shiny-server.git","ssh_url":"git@github.com:rstudio/shiny-server.git","clone_url":"https://github.com/rstudio/shiny-server.git","svn_url":"https://github.com/rstudio/shiny-server","homepage":"https://rstudio.com/shiny/server","size":7310,"stargazers_count":326,"watchers_count":326,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":164,"mirror_url":null,"open_issues_count":47,"forks":164,"open_issues":47,"watchers":326,"default_branch":"master"}},"base":{"label":"rstudio:master","ref":"master","sha":"46d586325c228535ada279cb30c7c72e838bb950","user":{"login":"rstudio","id":513560,"avatar_url":"https://avatars.githubusercontent.com/u/513560?v=3","gravatar_id":"","url":"https://api.github.com/users/rstudio","html_url":"https://github.com/rstudio","followers_url":"https://api.github.com/users/rstudio/followers","following_url":"https://api.github.com/users/rstudio/following{/other_user}","gists_url":"https://api.github.com/users/rstudio/gists{/gist_id}","starred_url":"https://api.github.com/users/rstudio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rstudio/subscriptions","organizations_url":"https://api.github.com/users/rstudio/orgs","repos_url":"https://api.github.com/users/rstudio/repos","events_url":"https://api.github.com/users/rstudio/events{/privacy}","received_events_url":"https://api.github.com/users/rstudio/received_events","type":"Organization","site_admin":false},"repo":{"id":5513742,"name":"shiny-server","full_name":"rstudio/shiny-server","owner":{"login":"rstudio","id":513560,"avatar_url":"https://avatars.githubusercontent.com/u/513560?v=3","gravatar_id":"","url":"https://api.github.com/users/rstudio","html_url":"https://github.com/rstudio","followers_url":"https://api.github.com/users/rstudio/followers","following_url":"https://api.github.com/users/rstudio/following{/other_user}","gists_url":"https://api.github.com/users/rstudio/gists{/gist_id}","starred_url":"https://api.github.com/users/rstudio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rstudio/subscriptions","organizations_url":"https://api.github.com/users/rstudio/orgs","repos_url":"https://api.github.com/users/rstudio/repos","events_url":"https://api.github.com/users/rstudio/events{/privacy}","received_events_url":"https://api.github.com/users/rstudio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rstudio/shiny-server","description":"Host Shiny applications over the web.","fork":false,"url":"https://api.github.com/repos/rstudio/shiny-server","forks_url":"https://api.github.com/repos/rstudio/shiny-server/forks","keys_url":"https://api.github.com/repos/rstudio/shiny-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rstudio/shiny-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rstudio/shiny-server/teams","hooks_url":"https://api.github.com/repos/rstudio/shiny-server/hooks","issue_events_url":"https://api.github.com/repos/rstudio/shiny-server/issues/events{/number}","events_url":"https://api.github.com/repos/rstudio/shiny-server/events","assignees_url":"https://api.github.com/repos/rstudio/shiny-server/assignees{/user}","branches_url":"https://api.github.com/repos/rstudio/shiny-server/branches{/branch}","tags_url":"https://api.github.com/repos/rstudio/shiny-server/tags","blobs_url":"https://api.github.com/repos/rstudio/shiny-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rstudio/shiny-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rstudio/shiny-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/rstudio/shiny-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rstudio/shiny-server/statuses/{sha}","languages_url":"https://api.github.com/repos/rstudio/shiny-server/languages","stargazers_url":"https://api.github.com/repos/rstudio/shiny-server/stargazers","contributors_url":"https://api.github.com/repos/rstudio/shiny-server/contributors","subscribers_url":"https://api.github.com/repos/rstudio/shiny-server/subscribers","subscription_url":"https://api.github.com/repos/rstudio/shiny-server/subscription","commits_url":"https://api.github.com/repos/rstudio/shiny-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/rstudio/shiny-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/rstudio/shiny-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/rstudio/shiny-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/rstudio/shiny-server/contents/{+path}","compare_url":"https://api.github.com/repos/rstudio/shiny-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rstudio/shiny-server/merges","archive_url":"https://api.github.com/repos/rstudio/shiny-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rstudio/shiny-server/downloads","issues_url":"https://api.github.com/repos/rstudio/shiny-server/issues{/number}","pulls_url":"https://api.github.com/repos/rstudio/shiny-server/pulls{/number}","milestones_url":"https://api.github.com/repos/rstudio/shiny-server/milestones{/number}","notifications_url":"https://api.github.com/repos/rstudio/shiny-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rstudio/shiny-server/labels{/name}","releases_url":"https://api.github.com/repos/rstudio/shiny-server/releases{/id}","created_at":"2012-08-22T18:42:22Z","updated_at":"2015-12-09T09:47:35Z","pushed_at":"2015-12-11T20:32:35Z","git_url":"git://github.com/rstudio/shiny-server.git","ssh_url":"git@github.com:rstudio/shiny-server.git","clone_url":"https://github.com/rstudio/shiny-server.git","svn_url":"https://github.com/rstudio/shiny-server","homepage":"https://rstudio.com/shiny/server","size":7310,"stargazers_count":326,"watchers_count":326,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":164,"mirror_url":null,"open_issues_count":47,"forks":164,"open_issues":47,"watchers":326,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rstudio/shiny-server/pulls/168"},"html":{"href":"https://github.com/rstudio/shiny-server/pull/168"},"issue":{"href":"https://api.github.com/repos/rstudio/shiny-server/issues/168"},"comments":{"href":"https://api.github.com/repos/rstudio/shiny-server/issues/168/comments"},"review_comments":{"href":"https://api.github.com/repos/rstudio/shiny-server/pulls/168/comments"},"review_comment":{"href":"https://api.github.com/repos/rstudio/shiny-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rstudio/shiny-server/pulls/168/commits"},"statuses":{"href":"https://api.github.com/repos/rstudio/shiny-server/statuses/4d6a527b016be6293b7403e84ba6f068869cce18"}}}}