{"action":"closed","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/29927","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/29927/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/29927/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/29927/events","html_url":"https://github.com/dotnet/corefx/issues/29927","id":326654068,"number":29927,"title":"HttpListener.Stop() Followed By task.GetAwaiter().GetResult() results in different exceptions on different OS","user":{"login":"bgottfried91","id":6910966,"avatar_url":"https://avatars3.githubusercontent.com/u/6910966?v=4","gravatar_id":"","url":"https://api.github.com/users/bgottfried91","html_url":"https://github.com/bgottfried91","followers_url":"https://api.github.com/users/bgottfried91/followers","following_url":"https://api.github.com/users/bgottfried91/following{/other_user}","gists_url":"https://api.github.com/users/bgottfried91/gists{/gist_id}","starred_url":"https://api.github.com/users/bgottfried91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgottfried91/subscriptions","organizations_url":"https://api.github.com/users/bgottfried91/orgs","repos_url":"https://api.github.com/users/bgottfried91/repos","events_url":"https://api.github.com/users/bgottfried91/events{/privacy}","received_events_url":"https://api.github.com/users/bgottfried91/received_events","type":"User","site_admin":false},"labels":[{"id":178058848,"url":"https://api.github.com/repos/dotnet/corefx/labels/area-System.Net","name":"area-System.Net","color":"d4c5f9","default":false},{"id":145399955,"url":"https://api.github.com/repos/dotnet/corefx/labels/bug","name":"bug","color":"207de5","default":true},{"id":205613977,"url":"https://api.github.com/repos/dotnet/corefx/labels/os-linux","name":"os-linux","color":"fef2c0","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/dotnet/corefx/milestones/5","html_url":"https://github.com/dotnet/corefx/milestone/5","labels_url":"https://api.github.com/repos/dotnet/corefx/milestones/5/labels","id":1328080,"number":5,"title":"Future","description":"Milestone tracking issues not triaged to a planned release. Work in this milestone may happen, or may not: it is not committed.","creator":{"login":"joshfree","id":1302850,"avatar_url":"https://avatars1.githubusercontent.com/u/1302850?v=4","gravatar_id":"","url":"https://api.github.com/users/joshfree","html_url":"https://github.com/joshfree","followers_url":"https://api.github.com/users/joshfree/followers","following_url":"https://api.github.com/users/joshfree/following{/other_user}","gists_url":"https://api.github.com/users/joshfree/gists{/gist_id}","starred_url":"https://api.github.com/users/joshfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshfree/subscriptions","organizations_url":"https://api.github.com/users/joshfree/orgs","repos_url":"https://api.github.com/users/joshfree/repos","events_url":"https://api.github.com/users/joshfree/events{/privacy}","received_events_url":"https://api.github.com/users/joshfree/received_events","type":"User","site_admin":false},"open_issues":1956,"closed_issues":137,"state":"open","created_at":"2015-09-29T00:25:45Z","updated_at":"2018-05-29T15:14:26Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2018-05-25T20:28:39Z","updated_at":"2018-05-29T15:14:26Z","closed_at":"2018-05-29T15:14:26Z","author_association":"NONE","body":"The following code will result in different exceptions being thrown depending on which OS it is running on:\r\n```c#            \r\n            HttpListener httpListener = new HttpListener();\r\n            httpListener.Prefixes.Add(\"http://localhost:8080/\");\r\n            httpListener.Start();\r\n            var task = Task.Run(() => httpListener.GetContextAsync().GetAwaiter().GetResult());\r\n            Task.Delay(1000).Wait();\r\n            httpListener.Stop();\r\n            task.GetAwaiter().GetResult();\r\n```\r\n\r\nOn Windows (using [SDK 2.1.300-rc1](https://www.microsoft.com/net/download/dotnet-core/sdk-2.1.300-rc1)) it results in an HttpListenerException ('The I/O operation has been aborted because of either a thread exit or an application request').\r\n\r\nOn the latest Debian Stretch Docker Image ([image tag dotnet:2.1-runtime from microsoft/dotnet](https://github.com/dotnet/dotnet-docker/blob/master/2.1/runtime/stretch-slim/amd64/Dockerfile)), it results in a ObjectDisposedException ('Cannot access a disposed object').\r\n\r\nAs far as I'm aware, the HttpListenerException is the expected behavior; is the ObjectDisposedException supposed to be thrown on Linux?"}}
{"actor":{"display_login":"bgottfried91"}}