{"action":"closed","number":175,"pull_request":{"url":"https://api.github.com/repos/pkg/sftp/pulls/175","id":114774440,"html_url":"https://github.com/pkg/sftp/pull/175","diff_url":"https://github.com/pkg/sftp/pull/175.diff","patch_url":"https://github.com/pkg/sftp/pull/175.patch","issue_url":"https://api.github.com/repos/pkg/sftp/issues/175","number":175,"state":"closed","locked":false,"title":"Fix race between client's close and write","user":{"login":"pborzenkov","id":434254,"avatar_url":"https://avatars3.githubusercontent.com/u/434254?v=3","gravatar_id":"","url":"https://api.github.com/users/pborzenkov","html_url":"https://github.com/pborzenkov","followers_url":"https://api.github.com/users/pborzenkov/followers","following_url":"https://api.github.com/users/pborzenkov/following{/other_user}","gists_url":"https://api.github.com/users/pborzenkov/gists{/gist_id}","starred_url":"https://api.github.com/users/pborzenkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pborzenkov/subscriptions","organizations_url":"https://api.github.com/users/pborzenkov/orgs","repos_url":"https://api.github.com/users/pborzenkov/repos","events_url":"https://api.github.com/users/pborzenkov/events{/privacy}","received_events_url":"https://api.github.com/users/pborzenkov/received_events","type":"User","site_admin":false},"body":"After commit 506f3a7 which removed clientConn mutex around\r\nconn.sendPacket, it is now possible for conn.Close and conn.Write to\r\nrace (https://travis-ci.org/pkg/sftp/jobs/219048782#L1838). The problem\r\nis really hard to reproduce, but I believe this patch fixes it.\r\n\r\nNow clientConn.Mutex protects 'inflight' map only, and conn.Mutex\r\nserializes connection writes/close.\r\n\r\nSigned-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>","created_at":"2017-04-07T09:13:22Z","updated_at":"2017-04-09T03:29:38Z","closed_at":"2017-04-09T03:29:38Z","merged_at":"2017-04-09T03:29:38Z","merge_commit_sha":"cb456b384cd3aae0ca1838cd59af8b6bb3363d67","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/pkg/sftp/pulls/175/commits","review_comments_url":"https://api.github.com/repos/pkg/sftp/pulls/175/comments","review_comment_url":"https://api.github.com/repos/pkg/sftp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pkg/sftp/issues/175/comments","statuses_url":"https://api.github.com/repos/pkg/sftp/statuses/b177e70291513f65fd8e664109c942a9eb9f2f77","head":{"label":"pborzenkov:close-write-race","ref":"close-write-race","sha":"b177e70291513f65fd8e664109c942a9eb9f2f77","user":{"login":"pborzenkov","id":434254,"avatar_url":"https://avatars3.githubusercontent.com/u/434254?v=3","gravatar_id":"","url":"https://api.github.com/users/pborzenkov","html_url":"https://github.com/pborzenkov","followers_url":"https://api.github.com/users/pborzenkov/followers","following_url":"https://api.github.com/users/pborzenkov/following{/other_user}","gists_url":"https://api.github.com/users/pborzenkov/gists{/gist_id}","starred_url":"https://api.github.com/users/pborzenkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pborzenkov/subscriptions","organizations_url":"https://api.github.com/users/pborzenkov/orgs","repos_url":"https://api.github.com/users/pborzenkov/repos","events_url":"https://api.github.com/users/pborzenkov/events{/privacy}","received_events_url":"https://api.github.com/users/pborzenkov/received_events","type":"User","site_admin":false},"repo":{"id":86353553,"name":"sftp","full_name":"pborzenkov/sftp","owner":{"login":"pborzenkov","id":434254,"avatar_url":"https://avatars3.githubusercontent.com/u/434254?v=3","gravatar_id":"","url":"https://api.github.com/users/pborzenkov","html_url":"https://github.com/pborzenkov","followers_url":"https://api.github.com/users/pborzenkov/followers","following_url":"https://api.github.com/users/pborzenkov/following{/other_user}","gists_url":"https://api.github.com/users/pborzenkov/gists{/gist_id}","starred_url":"https://api.github.com/users/pborzenkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pborzenkov/subscriptions","organizations_url":"https://api.github.com/users/pborzenkov/orgs","repos_url":"https://api.github.com/users/pborzenkov/repos","events_url":"https://api.github.com/users/pborzenkov/events{/privacy}","received_events_url":"https://api.github.com/users/pborzenkov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pborzenkov/sftp","description":"SFTP support for the go.crypto/ssh package","fork":true,"url":"https://api.github.com/repos/pborzenkov/sftp","forks_url":"https://api.github.com/repos/pborzenkov/sftp/forks","keys_url":"https://api.github.com/repos/pborzenkov/sftp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pborzenkov/sftp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pborzenkov/sftp/teams","hooks_url":"https://api.github.com/repos/pborzenkov/sftp/hooks","issue_events_url":"https://api.github.com/repos/pborzenkov/sftp/issues/events{/number}","events_url":"https://api.github.com/repos/pborzenkov/sftp/events","assignees_url":"https://api.github.com/repos/pborzenkov/sftp/assignees{/user}","branches_url":"https://api.github.com/repos/pborzenkov/sftp/branches{/branch}","tags_url":"https://api.github.com/repos/pborzenkov/sftp/tags","blobs_url":"https://api.github.com/repos/pborzenkov/sftp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pborzenkov/sftp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pborzenkov/sftp/git/refs{/sha}","trees_url":"https://api.github.com/repos/pborzenkov/sftp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pborzenkov/sftp/statuses/{sha}","languages_url":"https://api.github.com/repos/pborzenkov/sftp/languages","stargazers_url":"https://api.github.com/repos/pborzenkov/sftp/stargazers","contributors_url":"https://api.github.com/repos/pborzenkov/sftp/contributors","subscribers_url":"https://api.github.com/repos/pborzenkov/sftp/subscribers","subscription_url":"https://api.github.com/repos/pborzenkov/sftp/subscription","commits_url":"https://api.github.com/repos/pborzenkov/sftp/commits{/sha}","git_commits_url":"https://api.github.com/repos/pborzenkov/sftp/git/commits{/sha}","comments_url":"https://api.github.com/repos/pborzenkov/sftp/comments{/number}","issue_comment_url":"https://api.github.com/repos/pborzenkov/sftp/issues/comments{/number}","contents_url":"https://api.github.com/repos/pborzenkov/sftp/contents/{+path}","compare_url":"https://api.github.com/repos/pborzenkov/sftp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pborzenkov/sftp/merges","archive_url":"https://api.github.com/repos/pborzenkov/sftp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pborzenkov/sftp/downloads","issues_url":"https://api.github.com/repos/pborzenkov/sftp/issues{/number}","pulls_url":"https://api.github.com/repos/pborzenkov/sftp/pulls{/number}","milestones_url":"https://api.github.com/repos/pborzenkov/sftp/milestones{/number}","notifications_url":"https://api.github.com/repos/pborzenkov/sftp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pborzenkov/sftp/labels{/name}","releases_url":"https://api.github.com/repos/pborzenkov/sftp/releases{/id}","deployments_url":"https://api.github.com/repos/pborzenkov/sftp/deployments","created_at":"2017-03-27T15:39:59Z","updated_at":"2017-03-27T15:40:01Z","pushed_at":"2017-04-07T09:13:08Z","git_url":"git://github.com/pborzenkov/sftp.git","ssh_url":"git@github.com:pborzenkov/sftp.git","clone_url":"https://github.com/pborzenkov/sftp.git","svn_url":"https://github.com/pborzenkov/sftp","homepage":null,"size":1758,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pkg:master","ref":"master","sha":"6c86161fec09fa4d543f4ae7fc67dfab22abf457","user":{"login":"pkg","id":5497984,"avatar_url":"https://avatars0.githubusercontent.com/u/5497984?v=3","gravatar_id":"","url":"https://api.github.com/users/pkg","html_url":"https://github.com/pkg","followers_url":"https://api.github.com/users/pkg/followers","following_url":"https://api.github.com/users/pkg/following{/other_user}","gists_url":"https://api.github.com/users/pkg/gists{/gist_id}","starred_url":"https://api.github.com/users/pkg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkg/subscriptions","organizations_url":"https://api.github.com/users/pkg/orgs","repos_url":"https://api.github.com/users/pkg/repos","events_url":"https://api.github.com/users/pkg/events{/privacy}","received_events_url":"https://api.github.com/users/pkg/received_events","type":"Organization","site_admin":false},"repo":{"id":14132192,"name":"sftp","full_name":"pkg/sftp","owner":{"login":"pkg","id":5497984,"avatar_url":"https://avatars0.githubusercontent.com/u/5497984?v=3","gravatar_id":"","url":"https://api.github.com/users/pkg","html_url":"https://github.com/pkg","followers_url":"https://api.github.com/users/pkg/followers","following_url":"https://api.github.com/users/pkg/following{/other_user}","gists_url":"https://api.github.com/users/pkg/gists{/gist_id}","starred_url":"https://api.github.com/users/pkg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkg/subscriptions","organizations_url":"https://api.github.com/users/pkg/orgs","repos_url":"https://api.github.com/users/pkg/repos","events_url":"https://api.github.com/users/pkg/events{/privacy}","received_events_url":"https://api.github.com/users/pkg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pkg/sftp","description":"SFTP support for the go.crypto/ssh package","fork":false,"url":"https://api.github.com/repos/pkg/sftp","forks_url":"https://api.github.com/repos/pkg/sftp/forks","keys_url":"https://api.github.com/repos/pkg/sftp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pkg/sftp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pkg/sftp/teams","hooks_url":"https://api.github.com/repos/pkg/sftp/hooks","issue_events_url":"https://api.github.com/repos/pkg/sftp/issues/events{/number}","events_url":"https://api.github.com/repos/pkg/sftp/events","assignees_url":"https://api.github.com/repos/pkg/sftp/assignees{/user}","branches_url":"https://api.github.com/repos/pkg/sftp/branches{/branch}","tags_url":"https://api.github.com/repos/pkg/sftp/tags","blobs_url":"https://api.github.com/repos/pkg/sftp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pkg/sftp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pkg/sftp/git/refs{/sha}","trees_url":"https://api.github.com/repos/pkg/sftp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pkg/sftp/statuses/{sha}","languages_url":"https://api.github.com/repos/pkg/sftp/languages","stargazers_url":"https://api.github.com/repos/pkg/sftp/stargazers","contributors_url":"https://api.github.com/repos/pkg/sftp/contributors","subscribers_url":"https://api.github.com/repos/pkg/sftp/subscribers","subscription_url":"https://api.github.com/repos/pkg/sftp/subscription","commits_url":"https://api.github.com/repos/pkg/sftp/commits{/sha}","git_commits_url":"https://api.github.com/repos/pkg/sftp/git/commits{/sha}","comments_url":"https://api.github.com/repos/pkg/sftp/comments{/number}","issue_comment_url":"https://api.github.com/repos/pkg/sftp/issues/comments{/number}","contents_url":"https://api.github.com/repos/pkg/sftp/contents/{+path}","compare_url":"https://api.github.com/repos/pkg/sftp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pkg/sftp/merges","archive_url":"https://api.github.com/repos/pkg/sftp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pkg/sftp/downloads","issues_url":"https://api.github.com/repos/pkg/sftp/issues{/number}","pulls_url":"https://api.github.com/repos/pkg/sftp/pulls{/number}","milestones_url":"https://api.github.com/repos/pkg/sftp/milestones{/number}","notifications_url":"https://api.github.com/repos/pkg/sftp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pkg/sftp/labels{/name}","releases_url":"https://api.github.com/repos/pkg/sftp/releases{/id}","deployments_url":"https://api.github.com/repos/pkg/sftp/deployments","created_at":"2013-11-05T04:36:00Z","updated_at":"2017-04-05T11:18:50Z","pushed_at":"2017-04-09T03:29:38Z","git_url":"git://github.com/pkg/sftp.git","ssh_url":"git@github.com:pkg/sftp.git","clone_url":"https://github.com/pkg/sftp.git","svn_url":"https://github.com/pkg/sftp","homepage":null,"size":1755,"stargazers_count":344,"watchers_count":344,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":114,"mirror_url":null,"open_issues_count":15,"forks":114,"open_issues":15,"watchers":344,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pkg/sftp/pulls/175"},"html":{"href":"https://github.com/pkg/sftp/pull/175"},"issue":{"href":"https://api.github.com/repos/pkg/sftp/issues/175"},"comments":{"href":"https://api.github.com/repos/pkg/sftp/issues/175/comments"},"review_comments":{"href":"https://api.github.com/repos/pkg/sftp/pulls/175/comments"},"review_comment":{"href":"https://api.github.com/repos/pkg/sftp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pkg/sftp/pulls/175/commits"},"statuses":{"href":"https://api.github.com/repos/pkg/sftp/statuses/b177e70291513f65fd8e664109c942a9eb9f2f77"}},"merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"eikenb","id":722663,"avatar_url":"https://avatars1.githubusercontent.com/u/722663?v=3","gravatar_id":"","url":"https://api.github.com/users/eikenb","html_url":"https://github.com/eikenb","followers_url":"https://api.github.com/users/eikenb/followers","following_url":"https://api.github.com/users/eikenb/following{/other_user}","gists_url":"https://api.github.com/users/eikenb/gists{/gist_id}","starred_url":"https://api.github.com/users/eikenb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eikenb/subscriptions","organizations_url":"https://api.github.com/users/eikenb/orgs","repos_url":"https://api.github.com/users/eikenb/repos","events_url":"https://api.github.com/users/eikenb/events{/privacy}","received_events_url":"https://api.github.com/users/eikenb/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":2,"deletions":2,"changed_files":1}}
{"actor":{"display_login":"eikenb"}}