{"action":"created","comment":{"url":"https://api.github.com/repos/realm/realm-object-store/pulls/comments/96067160","pull_request_review_id":16644662,"id":96067160,"diff_hunk":"@@ -177,6 +197,10 @@ class SyncSession : public std::enable_shared_from_this<SyncSession> {\n \n     bool can_wait_for_network_completion() const;\n \n+    // Whether or not the session object in `m_session` has been `bind()`ed before.\n+    // This determines how the `SyncSession` behaves when refreshing tokens.\n+    bool m_session_has_been_bound;","path":"src/sync/sync_session.hpp","position":70,"original_position":70,"commit_id":"a9f16ac65dc650ac29ed9c1bf980b310ca93027e","original_commit_id":"a9f16ac65dc650ac29ed9c1bf980b310ca93027e","user":{"login":"bdash","id":54825,"avatar_url":"https://avatars.githubusercontent.com/u/54825?v=3","gravatar_id":"","url":"https://api.github.com/users/bdash","html_url":"https://github.com/bdash","followers_url":"https://api.github.com/users/bdash/followers","following_url":"https://api.github.com/users/bdash/following{/other_user}","gists_url":"https://api.github.com/users/bdash/gists{/gist_id}","starred_url":"https://api.github.com/users/bdash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdash/subscriptions","organizations_url":"https://api.github.com/users/bdash/orgs","repos_url":"https://api.github.com/users/bdash/repos","events_url":"https://api.github.com/users/bdash/events{/privacy}","received_events_url":"https://api.github.com/users/bdash/received_events","type":"User","site_admin":false},"body":"This member should be declared down near `m_session`, rather than amongst unrelated functions.","created_at":"2017-01-13T20:22:32Z","updated_at":"2017-01-13T20:22:58Z","html_url":"https://github.com/realm/realm-object-store/pull/338#discussion_r96067160","pull_request_url":"https://api.github.com/repos/realm/realm-object-store/pulls/338","_links":{"self":{"href":"https://api.github.com/repos/realm/realm-object-store/pulls/comments/96067160"},"html":{"href":"https://github.com/realm/realm-object-store/pull/338#discussion_r96067160"},"pull_request":{"href":"https://api.github.com/repos/realm/realm-object-store/pulls/338"}}},"pull_request":{"url":"https://api.github.com/repos/realm/realm-object-store/pulls/338","id":101501797,"html_url":"https://github.com/realm/realm-object-store/pull/338","diff_url":"https://github.com/realm/realm-object-store/pull/338.diff","patch_url":"https://github.com/realm/realm-object-store/pull/338.patch","issue_url":"https://api.github.com/repos/realm/realm-object-store/issues/338","number":338,"state":"open","locked":false,"title":"Fix a bug that crashes sync when refreshing a session’s token","user":{"login":"austinzheng","id":3687054,"avatar_url":"https://avatars.githubusercontent.com/u/3687054?v=3","gravatar_id":"","url":"https://api.github.com/users/austinzheng","html_url":"https://github.com/austinzheng","followers_url":"https://api.github.com/users/austinzheng/followers","following_url":"https://api.github.com/users/austinzheng/following{/other_user}","gists_url":"https://api.github.com/users/austinzheng/gists{/gist_id}","starred_url":"https://api.github.com/users/austinzheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/austinzheng/subscriptions","organizations_url":"https://api.github.com/users/austinzheng/orgs","repos_url":"https://api.github.com/users/austinzheng/repos","events_url":"https://api.github.com/users/austinzheng/events{/privacy}","received_events_url":"https://api.github.com/users/austinzheng/received_events","type":"User","site_admin":false},"body":"Fixes https://github.com/realm/realm-object-store/issues/337\r\n\r\nExplanation: you're not allowed to call `bind()` on a `sync::Session` more than once. In one particular situation (token expires while session is active) we had a code path that violated this requirement.","created_at":"2017-01-13T19:23:36Z","updated_at":"2017-01-13T20:22:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5da8d04bb2890f40c1f7ba35ab3ec516bf58ea9c","assignee":{"login":"austinzheng","id":3687054,"avatar_url":"https://avatars.githubusercontent.com/u/3687054?v=3","gravatar_id":"","url":"https://api.github.com/users/austinzheng","html_url":"https://github.com/austinzheng","followers_url":"https://api.github.com/users/austinzheng/followers","following_url":"https://api.github.com/users/austinzheng/following{/other_user}","gists_url":"https://api.github.com/users/austinzheng/gists{/gist_id}","starred_url":"https://api.github.com/users/austinzheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/austinzheng/subscriptions","organizations_url":"https://api.github.com/users/austinzheng/orgs","repos_url":"https://api.github.com/users/austinzheng/repos","events_url":"https://api.github.com/users/austinzheng/events{/privacy}","received_events_url":"https://api.github.com/users/austinzheng/received_events","type":"User","site_admin":false},"assignees":[{"login":"austinzheng","id":3687054,"avatar_url":"https://avatars.githubusercontent.com/u/3687054?v=3","gravatar_id":"","url":"https://api.github.com/users/austinzheng","html_url":"https://github.com/austinzheng","followers_url":"https://api.github.com/users/austinzheng/followers","following_url":"https://api.github.com/users/austinzheng/following{/other_user}","gists_url":"https://api.github.com/users/austinzheng/gists{/gist_id}","starred_url":"https://api.github.com/users/austinzheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/austinzheng/subscriptions","organizations_url":"https://api.github.com/users/austinzheng/orgs","repos_url":"https://api.github.com/users/austinzheng/repos","events_url":"https://api.github.com/users/austinzheng/events{/privacy}","received_events_url":"https://api.github.com/users/austinzheng/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/realm/realm-object-store/pulls/338/commits","review_comments_url":"https://api.github.com/repos/realm/realm-object-store/pulls/338/comments","review_comment_url":"https://api.github.com/repos/realm/realm-object-store/pulls/comments{/number}","comments_url":"https://api.github.com/repos/realm/realm-object-store/issues/338/comments","statuses_url":"https://api.github.com/repos/realm/realm-object-store/statuses/a9f16ac65dc650ac29ed9c1bf980b310ca93027e","head":{"label":"realm:az/fix-os-bind-bug","ref":"az/fix-os-bind-bug","sha":"a9f16ac65dc650ac29ed9c1bf980b310ca93027e","user":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"repo":{"id":36953657,"name":"realm-object-store","full_name":"realm/realm-object-store","owner":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/realm/realm-object-store","description":"Cross-platform abstractions used within Realm products","fork":false,"url":"https://api.github.com/repos/realm/realm-object-store","forks_url":"https://api.github.com/repos/realm/realm-object-store/forks","keys_url":"https://api.github.com/repos/realm/realm-object-store/keys{/key_id}","collaborators_url":"https://api.github.com/repos/realm/realm-object-store/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/realm/realm-object-store/teams","hooks_url":"https://api.github.com/repos/realm/realm-object-store/hooks","issue_events_url":"https://api.github.com/repos/realm/realm-object-store/issues/events{/number}","events_url":"https://api.github.com/repos/realm/realm-object-store/events","assignees_url":"https://api.github.com/repos/realm/realm-object-store/assignees{/user}","branches_url":"https://api.github.com/repos/realm/realm-object-store/branches{/branch}","tags_url":"https://api.github.com/repos/realm/realm-object-store/tags","blobs_url":"https://api.github.com/repos/realm/realm-object-store/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/realm/realm-object-store/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/realm/realm-object-store/git/refs{/sha}","trees_url":"https://api.github.com/repos/realm/realm-object-store/git/trees{/sha}","statuses_url":"https://api.github.com/repos/realm/realm-object-store/statuses/{sha}","languages_url":"https://api.github.com/repos/realm/realm-object-store/languages","stargazers_url":"https://api.github.com/repos/realm/realm-object-store/stargazers","contributors_url":"https://api.github.com/repos/realm/realm-object-store/contributors","subscribers_url":"https://api.github.com/repos/realm/realm-object-store/subscribers","subscription_url":"https://api.github.com/repos/realm/realm-object-store/subscription","commits_url":"https://api.github.com/repos/realm/realm-object-store/commits{/sha}","git_commits_url":"https://api.github.com/repos/realm/realm-object-store/git/commits{/sha}","comments_url":"https://api.github.com/repos/realm/realm-object-store/comments{/number}","issue_comment_url":"https://api.github.com/repos/realm/realm-object-store/issues/comments{/number}","contents_url":"https://api.github.com/repos/realm/realm-object-store/contents/{+path}","compare_url":"https://api.github.com/repos/realm/realm-object-store/compare/{base}...{head}","merges_url":"https://api.github.com/repos/realm/realm-object-store/merges","archive_url":"https://api.github.com/repos/realm/realm-object-store/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/realm/realm-object-store/downloads","issues_url":"https://api.github.com/repos/realm/realm-object-store/issues{/number}","pulls_url":"https://api.github.com/repos/realm/realm-object-store/pulls{/number}","milestones_url":"https://api.github.com/repos/realm/realm-object-store/milestones{/number}","notifications_url":"https://api.github.com/repos/realm/realm-object-store/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/realm/realm-object-store/labels{/name}","releases_url":"https://api.github.com/repos/realm/realm-object-store/releases{/id}","deployments_url":"https://api.github.com/repos/realm/realm-object-store/deployments","created_at":"2015-06-05T20:21:52Z","updated_at":"2017-01-09T11:05:16Z","pushed_at":"2017-01-13T19:57:29Z","git_url":"git://github.com/realm/realm-object-store.git","ssh_url":"git@github.com:realm/realm-object-store.git","clone_url":"https://github.com/realm/realm-object-store.git","svn_url":"https://github.com/realm/realm-object-store","homepage":"https://realm.io","size":1732,"stargazers_count":51,"watchers_count":51,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":33,"forks":7,"open_issues":33,"watchers":51,"default_branch":"master"}},"base":{"label":"realm:master","ref":"master","sha":"9ac9626f65c27306755e9cf61bd803d63a77263c","user":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"repo":{"id":36953657,"name":"realm-object-store","full_name":"realm/realm-object-store","owner":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/realm/realm-object-store","description":"Cross-platform abstractions used within Realm products","fork":false,"url":"https://api.github.com/repos/realm/realm-object-store","forks_url":"https://api.github.com/repos/realm/realm-object-store/forks","keys_url":"https://api.github.com/repos/realm/realm-object-store/keys{/key_id}","collaborators_url":"https://api.github.com/repos/realm/realm-object-store/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/realm/realm-object-store/teams","hooks_url":"https://api.github.com/repos/realm/realm-object-store/hooks","issue_events_url":"https://api.github.com/repos/realm/realm-object-store/issues/events{/number}","events_url":"https://api.github.com/repos/realm/realm-object-store/events","assignees_url":"https://api.github.com/repos/realm/realm-object-store/assignees{/user}","branches_url":"https://api.github.com/repos/realm/realm-object-store/branches{/branch}","tags_url":"https://api.github.com/repos/realm/realm-object-store/tags","blobs_url":"https://api.github.com/repos/realm/realm-object-store/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/realm/realm-object-store/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/realm/realm-object-store/git/refs{/sha}","trees_url":"https://api.github.com/repos/realm/realm-object-store/git/trees{/sha}","statuses_url":"https://api.github.com/repos/realm/realm-object-store/statuses/{sha}","languages_url":"https://api.github.com/repos/realm/realm-object-store/languages","stargazers_url":"https://api.github.com/repos/realm/realm-object-store/stargazers","contributors_url":"https://api.github.com/repos/realm/realm-object-store/contributors","subscribers_url":"https://api.github.com/repos/realm/realm-object-store/subscribers","subscription_url":"https://api.github.com/repos/realm/realm-object-store/subscription","commits_url":"https://api.github.com/repos/realm/realm-object-store/commits{/sha}","git_commits_url":"https://api.github.com/repos/realm/realm-object-store/git/commits{/sha}","comments_url":"https://api.github.com/repos/realm/realm-object-store/comments{/number}","issue_comment_url":"https://api.github.com/repos/realm/realm-object-store/issues/comments{/number}","contents_url":"https://api.github.com/repos/realm/realm-object-store/contents/{+path}","compare_url":"https://api.github.com/repos/realm/realm-object-store/compare/{base}...{head}","merges_url":"https://api.github.com/repos/realm/realm-object-store/merges","archive_url":"https://api.github.com/repos/realm/realm-object-store/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/realm/realm-object-store/downloads","issues_url":"https://api.github.com/repos/realm/realm-object-store/issues{/number}","pulls_url":"https://api.github.com/repos/realm/realm-object-store/pulls{/number}","milestones_url":"https://api.github.com/repos/realm/realm-object-store/milestones{/number}","notifications_url":"https://api.github.com/repos/realm/realm-object-store/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/realm/realm-object-store/labels{/name}","releases_url":"https://api.github.com/repos/realm/realm-object-store/releases{/id}","deployments_url":"https://api.github.com/repos/realm/realm-object-store/deployments","created_at":"2015-06-05T20:21:52Z","updated_at":"2017-01-09T11:05:16Z","pushed_at":"2017-01-13T19:57:29Z","git_url":"git://github.com/realm/realm-object-store.git","ssh_url":"git@github.com:realm/realm-object-store.git","clone_url":"https://github.com/realm/realm-object-store.git","svn_url":"https://github.com/realm/realm-object-store","homepage":"https://realm.io","size":1732,"stargazers_count":51,"watchers_count":51,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":33,"forks":7,"open_issues":33,"watchers":51,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/realm/realm-object-store/pulls/338"},"html":{"href":"https://github.com/realm/realm-object-store/pull/338"},"issue":{"href":"https://api.github.com/repos/realm/realm-object-store/issues/338"},"comments":{"href":"https://api.github.com/repos/realm/realm-object-store/issues/338/comments"},"review_comments":{"href":"https://api.github.com/repos/realm/realm-object-store/pulls/338/comments"},"review_comment":{"href":"https://api.github.com/repos/realm/realm-object-store/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/realm/realm-object-store/pulls/338/commits"},"statuses":{"href":"https://api.github.com/repos/realm/realm-object-store/statuses/a9f16ac65dc650ac29ed9c1bf980b310ca93027e"}}}}
{"actor":{"display_login":"bdash"}}