{"action":"opened","number":16,"pull_request":{"url":"https://api.github.com/repos/mcuadros/go-syslog/pulls/16","id":39085112,"html_url":"https://github.com/mcuadros/go-syslog/pull/16","diff_url":"https://github.com/mcuadros/go-syslog/pull/16.diff","patch_url":"https://github.com/mcuadros/go-syslog/pull/16.patch","issue_url":"https://api.github.com/repos/mcuadros/go-syslog/issues/16","number":16,"state":"open","locked":false,"title":"Fix data race by waiting for Handler using server's WaitGroup","user":{"login":"cezarsa","id":11041,"avatar_url":"https://avatars.githubusercontent.com/u/11041?v=3","gravatar_id":"","url":"https://api.github.com/users/cezarsa","html_url":"https://github.com/cezarsa","followers_url":"https://api.github.com/users/cezarsa/followers","following_url":"https://api.github.com/users/cezarsa/following{/other_user}","gists_url":"https://api.github.com/users/cezarsa/gists{/gist_id}","starred_url":"https://api.github.com/users/cezarsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cezarsa/subscriptions","organizations_url":"https://api.github.com/users/cezarsa/orgs","repos_url":"https://api.github.com/users/cezarsa/repos","events_url":"https://api.github.com/users/cezarsa/events{/privacy}","received_events_url":"https://api.github.com/users/cezarsa/received_events","type":"User","site_admin":false},"body":"Handlers can take some time to run, and it's expected that after Server.Wait() returns the handler has already finished executing.\r\n\r\nThe following data race was triggered by tests and fixed by this pull request:\r\n\r\n```\r\n$ go test -race\r\n==================\r\nWARNING: DATA RACE\r\nRead by goroutine 20:\r\n  gopkg.in/mcuadros/go-syslog%2ev2.(*ServerSuite).TestTailFile()\r\n      /Users/cezar.sa/go/src/gopkg.in/mcuadros/go-syslog.v2/server_test.go:43 +0x283\r\n  runtime.call16()\r\n      /usr/local/Cellar/go/1.4.2/libexec/src/runtime/asm_amd64.s:401 +0x44\r\n  reflect.Value.Call()\r\n      /usr/local/Cellar/go/1.4.2/libexec/src/reflect/value.go:296 +0xd8\r\n  launchpad.net/gocheck.func·006()\r\n      /Users/cezar.sa/go/src/launchpad.net/gocheck/gocheck.go:733 +0x51d\r\n  launchpad.net/gocheck.func·004()\r\n      /Users/cezar.sa/go/src/launchpad.net/gocheck/gocheck.go:628 +0xf7\r\n\r\nPrevious write by goroutine 24:\r\n  gopkg.in/mcuadros/go-syslog%2ev2.(*HandlerMock).Handle()\r\n      /Users/cezar.sa/go/src/gopkg.in/mcuadros/go-syslog.v2/server_test.go:85 +0x36\r\n\r\nGoroutine 20 (running) created at:\r\n  launchpad.net/gocheck.(*suiteRunner).forkCall()\r\n      /Users/cezar.sa/go/src/launchpad.net/gocheck/gocheck.go:629 +0x544\r\n  launchpad.net/gocheck.(*suiteRunner).forkTest()\r\n      /Users/cezar.sa/go/src/launchpad.net/gocheck/gocheck.go:765 +0xf2\r\n  launchpad.net/gocheck.(*suiteRunner).runTest()\r\n      /Users/cezar.sa/go/src/launchpad.net/gocheck/gocheck.go:770 +0x3f\r\n  launchpad.net/gocheck.(*suiteRunner).run()\r\n      /Users/cezar.sa/go/src/launchpad.net/gocheck/gocheck.go:584 +0x3aa\r\n  launchpad.net/gocheck.Run()\r\n      /Users/cezar.sa/go/src/launchpad.net/gocheck/run.go:76 +0x57\r\n  launchpad.net/gocheck.RunAll()\r\n      /Users/cezar.sa/go/src/launchpad.net/gocheck/run.go:68 +0x132\r\n  launchpad.net/gocheck.TestingT()\r\n      /Users/cezar.sa/go/src/launchpad.net/gocheck/run.go:56 +0x582\r\n  gopkg.in/mcuadros/go-syslog%2ev2.Test()\r\n      /Users/cezar.sa/go/src/gopkg.in/mcuadros/go-syslog.v2/server_test.go:13 +0x35\r\n  testing.tRunner()\r\n      /usr/local/Cellar/go/1.4.2/libexec/src/testing/testing.go:447 +0x133\r\n\r\nGoroutine 24 (finished) created at:\r\n  gopkg.in/mcuadros/go-syslog%2ev2.(*Server).parser()\r\n      /Users/cezar.sa/go/src/gopkg.in/mcuadros/go-syslog.v2/server.go:196 +0x1bb\r\n  gopkg.in/mcuadros/go-syslog%2ev2.(*Server).scan()\r\n      /Users/cezar.sa/go/src/gopkg.in/mcuadros/go-syslog.v2/server.go:163 +0x146\r\n==================\r\n```","created_at":"2015-07-02T13:57:28Z","updated_at":"2015-07-02T13:57:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a5590da93e8a138adc570f7bff4d4d808aee94bb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mcuadros/go-syslog/pulls/16/commits","review_comments_url":"https://api.github.com/repos/mcuadros/go-syslog/pulls/16/comments","review_comment_url":"https://api.github.com/repos/mcuadros/go-syslog/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mcuadros/go-syslog/issues/16/comments","statuses_url":"https://api.github.com/repos/mcuadros/go-syslog/statuses/0616cf0ebb0c56eb0712e51ffe579f02cea17cda","head":{"label":"cezarsa:master","ref":"master","sha":"0616cf0ebb0c56eb0712e51ffe579f02cea17cda","user":{"login":"cezarsa","id":11041,"avatar_url":"https://avatars.githubusercontent.com/u/11041?v=3","gravatar_id":"","url":"https://api.github.com/users/cezarsa","html_url":"https://github.com/cezarsa","followers_url":"https://api.github.com/users/cezarsa/followers","following_url":"https://api.github.com/users/cezarsa/following{/other_user}","gists_url":"https://api.github.com/users/cezarsa/gists{/gist_id}","starred_url":"https://api.github.com/users/cezarsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cezarsa/subscriptions","organizations_url":"https://api.github.com/users/cezarsa/orgs","repos_url":"https://api.github.com/users/cezarsa/repos","events_url":"https://api.github.com/users/cezarsa/events{/privacy}","received_events_url":"https://api.github.com/users/cezarsa/received_events","type":"User","site_admin":false},"repo":{"id":38435531,"name":"go-syslog","full_name":"cezarsa/go-syslog","owner":{"login":"cezarsa","id":11041,"avatar_url":"https://avatars.githubusercontent.com/u/11041?v=3","gravatar_id":"","url":"https://api.github.com/users/cezarsa","html_url":"https://github.com/cezarsa","followers_url":"https://api.github.com/users/cezarsa/followers","following_url":"https://api.github.com/users/cezarsa/following{/other_user}","gists_url":"https://api.github.com/users/cezarsa/gists{/gist_id}","starred_url":"https://api.github.com/users/cezarsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cezarsa/subscriptions","organizations_url":"https://api.github.com/users/cezarsa/orgs","repos_url":"https://api.github.com/users/cezarsa/repos","events_url":"https://api.github.com/users/cezarsa/events{/privacy}","received_events_url":"https://api.github.com/users/cezarsa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cezarsa/go-syslog","description":"Syslog server library for go.","fork":true,"url":"https://api.github.com/repos/cezarsa/go-syslog","forks_url":"https://api.github.com/repos/cezarsa/go-syslog/forks","keys_url":"https://api.github.com/repos/cezarsa/go-syslog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cezarsa/go-syslog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cezarsa/go-syslog/teams","hooks_url":"https://api.github.com/repos/cezarsa/go-syslog/hooks","issue_events_url":"https://api.github.com/repos/cezarsa/go-syslog/issues/events{/number}","events_url":"https://api.github.com/repos/cezarsa/go-syslog/events","assignees_url":"https://api.github.com/repos/cezarsa/go-syslog/assignees{/user}","branches_url":"https://api.github.com/repos/cezarsa/go-syslog/branches{/branch}","tags_url":"https://api.github.com/repos/cezarsa/go-syslog/tags","blobs_url":"https://api.github.com/repos/cezarsa/go-syslog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cezarsa/go-syslog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cezarsa/go-syslog/git/refs{/sha}","trees_url":"https://api.github.com/repos/cezarsa/go-syslog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cezarsa/go-syslog/statuses/{sha}","languages_url":"https://api.github.com/repos/cezarsa/go-syslog/languages","stargazers_url":"https://api.github.com/repos/cezarsa/go-syslog/stargazers","contributors_url":"https://api.github.com/repos/cezarsa/go-syslog/contributors","subscribers_url":"https://api.github.com/repos/cezarsa/go-syslog/subscribers","subscription_url":"https://api.github.com/repos/cezarsa/go-syslog/subscription","commits_url":"https://api.github.com/repos/cezarsa/go-syslog/commits{/sha}","git_commits_url":"https://api.github.com/repos/cezarsa/go-syslog/git/commits{/sha}","comments_url":"https://api.github.com/repos/cezarsa/go-syslog/comments{/number}","issue_comment_url":"https://api.github.com/repos/cezarsa/go-syslog/issues/comments{/number}","contents_url":"https://api.github.com/repos/cezarsa/go-syslog/contents/{+path}","compare_url":"https://api.github.com/repos/cezarsa/go-syslog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cezarsa/go-syslog/merges","archive_url":"https://api.github.com/repos/cezarsa/go-syslog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cezarsa/go-syslog/downloads","issues_url":"https://api.github.com/repos/cezarsa/go-syslog/issues{/number}","pulls_url":"https://api.github.com/repos/cezarsa/go-syslog/pulls{/number}","milestones_url":"https://api.github.com/repos/cezarsa/go-syslog/milestones{/number}","notifications_url":"https://api.github.com/repos/cezarsa/go-syslog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cezarsa/go-syslog/labels{/name}","releases_url":"https://api.github.com/repos/cezarsa/go-syslog/releases{/id}","created_at":"2015-07-02T13:52:34Z","updated_at":"2015-07-02T13:52:34Z","pushed_at":"2015-07-02T13:56:03Z","git_url":"git://github.com/cezarsa/go-syslog.git","ssh_url":"git@github.com:cezarsa/go-syslog.git","clone_url":"https://github.com/cezarsa/go-syslog.git","svn_url":"https://github.com/cezarsa/go-syslog","homepage":"http://godoc.org/github.com/mcuadros/go-syslog","size":115,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"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":"mcuadros:master","ref":"master","sha":"0c7b4a44c4f61cbe0f51b3d983164b0b0bfdb2cb","user":{"login":"mcuadros","id":1573114,"avatar_url":"https://avatars.githubusercontent.com/u/1573114?v=3","gravatar_id":"","url":"https://api.github.com/users/mcuadros","html_url":"https://github.com/mcuadros","followers_url":"https://api.github.com/users/mcuadros/followers","following_url":"https://api.github.com/users/mcuadros/following{/other_user}","gists_url":"https://api.github.com/users/mcuadros/gists{/gist_id}","starred_url":"https://api.github.com/users/mcuadros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcuadros/subscriptions","organizations_url":"https://api.github.com/users/mcuadros/orgs","repos_url":"https://api.github.com/users/mcuadros/repos","events_url":"https://api.github.com/users/mcuadros/events{/privacy}","received_events_url":"https://api.github.com/users/mcuadros/received_events","type":"User","site_admin":false},"repo":{"id":15427682,"name":"go-syslog","full_name":"mcuadros/go-syslog","owner":{"login":"mcuadros","id":1573114,"avatar_url":"https://avatars.githubusercontent.com/u/1573114?v=3","gravatar_id":"","url":"https://api.github.com/users/mcuadros","html_url":"https://github.com/mcuadros","followers_url":"https://api.github.com/users/mcuadros/followers","following_url":"https://api.github.com/users/mcuadros/following{/other_user}","gists_url":"https://api.github.com/users/mcuadros/gists{/gist_id}","starred_url":"https://api.github.com/users/mcuadros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcuadros/subscriptions","organizations_url":"https://api.github.com/users/mcuadros/orgs","repos_url":"https://api.github.com/users/mcuadros/repos","events_url":"https://api.github.com/users/mcuadros/events{/privacy}","received_events_url":"https://api.github.com/users/mcuadros/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mcuadros/go-syslog","description":"Syslog server library for go.","fork":false,"url":"https://api.github.com/repos/mcuadros/go-syslog","forks_url":"https://api.github.com/repos/mcuadros/go-syslog/forks","keys_url":"https://api.github.com/repos/mcuadros/go-syslog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mcuadros/go-syslog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mcuadros/go-syslog/teams","hooks_url":"https://api.github.com/repos/mcuadros/go-syslog/hooks","issue_events_url":"https://api.github.com/repos/mcuadros/go-syslog/issues/events{/number}","events_url":"https://api.github.com/repos/mcuadros/go-syslog/events","assignees_url":"https://api.github.com/repos/mcuadros/go-syslog/assignees{/user}","branches_url":"https://api.github.com/repos/mcuadros/go-syslog/branches{/branch}","tags_url":"https://api.github.com/repos/mcuadros/go-syslog/tags","blobs_url":"https://api.github.com/repos/mcuadros/go-syslog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mcuadros/go-syslog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mcuadros/go-syslog/git/refs{/sha}","trees_url":"https://api.github.com/repos/mcuadros/go-syslog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mcuadros/go-syslog/statuses/{sha}","languages_url":"https://api.github.com/repos/mcuadros/go-syslog/languages","stargazers_url":"https://api.github.com/repos/mcuadros/go-syslog/stargazers","contributors_url":"https://api.github.com/repos/mcuadros/go-syslog/contributors","subscribers_url":"https://api.github.com/repos/mcuadros/go-syslog/subscribers","subscription_url":"https://api.github.com/repos/mcuadros/go-syslog/subscription","commits_url":"https://api.github.com/repos/mcuadros/go-syslog/commits{/sha}","git_commits_url":"https://api.github.com/repos/mcuadros/go-syslog/git/commits{/sha}","comments_url":"https://api.github.com/repos/mcuadros/go-syslog/comments{/number}","issue_comment_url":"https://api.github.com/repos/mcuadros/go-syslog/issues/comments{/number}","contents_url":"https://api.github.com/repos/mcuadros/go-syslog/contents/{+path}","compare_url":"https://api.github.com/repos/mcuadros/go-syslog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mcuadros/go-syslog/merges","archive_url":"https://api.github.com/repos/mcuadros/go-syslog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mcuadros/go-syslog/downloads","issues_url":"https://api.github.com/repos/mcuadros/go-syslog/issues{/number}","pulls_url":"https://api.github.com/repos/mcuadros/go-syslog/pulls{/number}","milestones_url":"https://api.github.com/repos/mcuadros/go-syslog/milestones{/number}","notifications_url":"https://api.github.com/repos/mcuadros/go-syslog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mcuadros/go-syslog/labels{/name}","releases_url":"https://api.github.com/repos/mcuadros/go-syslog/releases{/id}","created_at":"2013-12-25T01:32:21Z","updated_at":"2015-06-22T08:14:32Z","pushed_at":"2015-07-02T13:57:28Z","git_url":"git://github.com/mcuadros/go-syslog.git","ssh_url":"git@github.com:mcuadros/go-syslog.git","clone_url":"https://github.com/mcuadros/go-syslog.git","svn_url":"https://github.com/mcuadros/go-syslog","homepage":"http://godoc.org/github.com/mcuadros/go-syslog","size":344,"stargazers_count":41,"watchers_count":41,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":4,"forks":15,"open_issues":4,"watchers":41,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mcuadros/go-syslog/pulls/16"},"html":{"href":"https://github.com/mcuadros/go-syslog/pull/16"},"issue":{"href":"https://api.github.com/repos/mcuadros/go-syslog/issues/16"},"comments":{"href":"https://api.github.com/repos/mcuadros/go-syslog/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/mcuadros/go-syslog/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/mcuadros/go-syslog/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mcuadros/go-syslog/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/mcuadros/go-syslog/statuses/0616cf0ebb0c56eb0712e51ffe579f02cea17cda"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":5,"deletions":1,"changed_files":1}}