{"action":"opened","issue":{"url":"https://api.github.com/repos/golang/go/issues/11266","labels_url":"https://api.github.com/repos/golang/go/issues/11266/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/11266/comments","events_url":"https://api.github.com/repos/golang/go/issues/11266/events","html_url":"https://github.com/golang/go/issues/11266","id":89158059,"number":11266,"title":"net: Plan 9 setKeepAlivePeriod bug?","user":{"login":"bradfitz","id":2621,"avatar_url":"https://avatars.githubusercontent.com/u/2621?v=3","gravatar_id":"","url":"https://api.github.com/users/bradfitz","html_url":"https://github.com/bradfitz","followers_url":"https://api.github.com/users/bradfitz/followers","following_url":"https://api.github.com/users/bradfitz/following{/other_user}","gists_url":"https://api.github.com/users/bradfitz/gists{/gist_id}","starred_url":"https://api.github.com/users/bradfitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradfitz/subscriptions","organizations_url":"https://api.github.com/users/bradfitz/orgs","repos_url":"https://api.github.com/users/bradfitz/repos","events_url":"https://api.github.com/users/bradfitz/events{/privacy}","received_events_url":"https://api.github.com/users/bradfitz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/golang/go/labels/OS-Plan9","name":"OS-Plan9","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/2","html_url":"https://github.com/golang/go/milestones/Go1.5Maybe","labels_url":"https://api.github.com/repos/golang/go/milestones/2/labels","id":905114,"number":2,"title":"Go1.5Maybe","description":"Things that might make Go 1.5, but aren't critical.\r\n","creator":{"login":"bradfitz","id":2621,"avatar_url":"https://avatars.githubusercontent.com/u/2621?v=3","gravatar_id":"","url":"https://api.github.com/users/bradfitz","html_url":"https://github.com/bradfitz","followers_url":"https://api.github.com/users/bradfitz/followers","following_url":"https://api.github.com/users/bradfitz/following{/other_user}","gists_url":"https://api.github.com/users/bradfitz/gists{/gist_id}","starred_url":"https://api.github.com/users/bradfitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradfitz/subscriptions","organizations_url":"https://api.github.com/users/bradfitz/orgs","repos_url":"https://api.github.com/users/bradfitz/repos","events_url":"https://api.github.com/users/bradfitz/events{/privacy}","received_events_url":"https://api.github.com/users/bradfitz/received_events","type":"User","site_admin":false},"open_issues":136,"closed_issues":17,"state":"open","created_at":"2014-12-16T02:39:13Z","updated_at":"2015-06-18T00:11:19Z","due_on":"2015-07-31T04:00:00Z","closed_at":null},"comments":0,"created_at":"2015-06-18T00:11:19Z","updated_at":"2015-06-18T00:11:19Z","closed_at":null,"body":"Plan 9's network code in src/net/tcpsockopt_plan9.go contains this questionable piece of code writing to the ctl file:\r\n\r\n```\r\n// Set keep alive period.                                                                                                                  \r\nfunc setKeepAlivePeriod(fd *netFD, d time.Duration) error {\r\n        cmd := \"keepalive \" + string(int64(d/time.Millisecond))\r\n        _, e := fd.ctl.WriteAt([]byte(cmd), 0)\r\n        return e\r\n}\r\n```\r\n\r\nIs that really the Plan 9 interface? Or should be it strconv.Itoa instead?\r\n\r\nOtherwise it's actually writing something like `\"keepalive Ϩ\"` if d is `1 * time.Second`.\r\n"}}