{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/5763","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/5763/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/5763/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/5763/events","html_url":"https://github.com/dotnet/corefx/issues/5763","id":129628306,"number":5763,"title":"ObjectDisposedException on OpenSSL when connecting to SQLAzure on Unix","user":{"login":"kkurni","id":698547,"avatar_url":"https://avatars.githubusercontent.com/u/698547?v=3","gravatar_id":"","url":"https://api.github.com/users/kkurni","html_url":"https://github.com/kkurni","followers_url":"https://api.github.com/users/kkurni/followers","following_url":"https://api.github.com/users/kkurni/following{/other_user}","gists_url":"https://api.github.com/users/kkurni/gists{/gist_id}","starred_url":"https://api.github.com/users/kkurni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkurni/subscriptions","organizations_url":"https://api.github.com/users/kkurni/orgs","repos_url":"https://api.github.com/users/kkurni/repos","events_url":"https://api.github.com/users/kkurni/events{/privacy}","received_events_url":"https://api.github.com/users/kkurni/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/corefx/labels/System.Data","name":"System.Data","color":"d4c5f9"},{"url":"https://api.github.com/repos/dotnet/corefx/labels/System.Net","name":"System.Net","color":"d4c5f9"},{"url":"https://api.github.com/repos/dotnet/corefx/labels/System.Security","name":"System.Security","color":"d4c5f9"},{"url":"https://api.github.com/repos/dotnet/corefx/labels/X-Plat","name":"X-Plat","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"bartonjs","id":10642668,"avatar_url":"https://avatars.githubusercontent.com/u/10642668?v=3","gravatar_id":"","url":"https://api.github.com/users/bartonjs","html_url":"https://github.com/bartonjs","followers_url":"https://api.github.com/users/bartonjs/followers","following_url":"https://api.github.com/users/bartonjs/following{/other_user}","gists_url":"https://api.github.com/users/bartonjs/gists{/gist_id}","starred_url":"https://api.github.com/users/bartonjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartonjs/subscriptions","organizations_url":"https://api.github.com/users/bartonjs/orgs","repos_url":"https://api.github.com/users/bartonjs/repos","events_url":"https://api.github.com/users/bartonjs/events{/privacy}","received_events_url":"https://api.github.com/users/bartonjs/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/dotnet/corefx/milestones/6","html_url":"https://github.com/dotnet/corefx/milestones/1.0.0-rc2","labels_url":"https://api.github.com/repos/dotnet/corefx/milestones/6/labels","id":1365455,"number":6,"title":"1.0.0-rc2","description":"","creator":{"login":"joshfree","id":1302850,"avatar_url":"https://avatars.githubusercontent.com/u/1302850?v=3","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":83,"closed_issues":390,"state":"open","created_at":"2015-10-20T04:29:15Z","updated_at":"2016-01-29T00:49:11Z","due_on":"2016-02-02T08:00:00Z","closed_at":null},"comments":5,"created_at":"2016-01-29T00:41:55Z","updated_at":"2016-01-29T01:06:59Z","closed_at":null,"body":"I notice SSLStream (OpenSSL) on Unix throws ObjectDisposedException after finish connecting on SqlAzure on Unix.\r\n\r\n(There is no exception on Prem).\r\n\r\nThis may be related with issue on Mac as well. On Mac, it throws RemoteCertificateNameMismatch.\r\nhttps://github.com/dotnet/corefx/issues/5173\r\n\r\n![image](https://cloud.githubusercontent.com/assets/698547/12663551/fe2abc94-c5dd-11e5-9f22-be1775c8df01.png)\r\n\r\n```\r\nUnhandled Exception: System.ObjectDisposedException: Safe handle has been closed\r\n   at System.Runtime.InteropServices.SafeHandle.DangerousAddRef(Boolean& success)\r\n   at System.StubHelpers.StubHelpers.SafeHandleAddRef(SafeHandle pHandle, Boolean& success)\r\n   at Interop.Ssl.SslShutdown(SafeSslHandle ssl)\r\n   at Interop.OpenSsl.Disconnect(SafeSslHandle context)\r\n   at System.Net.Security.SafeDeleteContext.ReleaseHandle()\r\n   at System.Runtime.InteropServices.SafeHandle.InternalFinalize()\r\n   at System.Runtime.InteropServices.SafeHandle.Dispose(Boolean disposing)\r\n   at System.Runtime.InteropServices.SafeHandle.Finalize()\r\n[1]    24788 abort (core dumped)  ./corerun xunit.console.netcore.exe System.Data.SqlClient.Tests.dll -class\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/176506101","html_url":"https://github.com/dotnet/corefx/issues/5763#issuecomment-176506101","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/5763","id":176506101,"user":{"login":"bartonjs","id":10642668,"avatar_url":"https://avatars.githubusercontent.com/u/10642668?v=3","gravatar_id":"","url":"https://api.github.com/users/bartonjs","html_url":"https://github.com/bartonjs","followers_url":"https://api.github.com/users/bartonjs/followers","following_url":"https://api.github.com/users/bartonjs/following{/other_user}","gists_url":"https://api.github.com/users/bartonjs/gists{/gist_id}","starred_url":"https://api.github.com/users/bartonjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartonjs/subscriptions","organizations_url":"https://api.github.com/users/bartonjs/orgs","repos_url":"https://api.github.com/users/bartonjs/repos","events_url":"https://api.github.com/users/bartonjs/events{/privacy}","received_events_url":"https://api.github.com/users/bartonjs/received_events","type":"User","site_admin":false},"created_at":"2016-01-29T01:06:59Z","updated_at":"2016-01-29T01:06:59Z","body":"@kkurni Hmm, what build are you using?  I noticed that the callstack here has `Interop.Ssl.SslShutdown(SafeSslHandle)`, but that changed to `Interop.Ssl.SslShutdown(IntPtr)` back in November... for a strikingly-similar issue: https://github.com/dotnet/corefx/issues/4480."}}