{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/11219","labels_url":"https://api.github.com/repos/golang/go/issues/11219/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/11219/comments","events_url":"https://api.github.com/repos/golang/go/issues/11219/events","html_url":"https://github.com/golang/go/issues/11219","id":88494326,"number":11219,"title":"net/http: Server.Serve does not handle a closed Listener gracefully","user":{"login":"willfaught","id":63830,"avatar_url":"https://avatars.githubusercontent.com/u/63830?v=3","gravatar_id":"","url":"https://api.github.com/users/willfaught","html_url":"https://github.com/willfaught","followers_url":"https://api.github.com/users/willfaught/followers","following_url":"https://api.github.com/users/willfaught/following{/other_user}","gists_url":"https://api.github.com/users/willfaught/gists{/gist_id}","starred_url":"https://api.github.com/users/willfaught/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willfaught/subscriptions","organizations_url":"https://api.github.com/users/willfaught/orgs","repos_url":"https://api.github.com/users/willfaught/repos","events_url":"https://api.github.com/users/willfaught/events{/privacy}","received_events_url":"https://api.github.com/users/willfaught/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-15T17:48:28Z","updated_at":"2015-06-15T17:55:59Z","closed_at":null,"body":"net/http.Server.Serve returns an error when the Listener argument is closed, which means you cannot gracefully stop the server (no error returned). It should instead check if the Listener is closed and return nil if so."},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/112153129","html_url":"https://github.com/golang/go/issues/11219#issuecomment-112153129","issue_url":"https://api.github.com/repos/golang/go/issues/11219","id":112153129,"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},"created_at":"2015-06-15T17:55:59Z","updated_at":"2015-06-15T17:55:59Z","body":"Graceful shutdown involves more than that. Have you seen the various packages implementing graceful shutdown http://godoc.org/?q=graceful ? The mostly use the ConnState mechanism. See also the graceful shutdown history in #4674.\r\n\r\nI'm not sure anything is required here. Any code doing graceful shutdown will have its own Listener type that's keeping track of state anyway.\r\n\r\n"}}