René's URL Explorer Experiment


Title: sockets end in close_wait state after some time · Issue #29 · Code-Sharp/uHttpSharp · GitHub

Open Graph Title: sockets end in close_wait state after some time · Issue #29 · Code-Sharp/uHttpSharp

X Title: sockets end in close_wait state after some time · Issue #29 · Code-Sharp/uHttpSharp

Description: Looks like we are missing a time-out on stream reader in uhttpsharp\HttpClient.cs When remote http client gets disconnected due to some network issues (or because of proxies in between not handling the keep-alive header properly), uHttpS...

Open Graph Description: Looks like we are missing a time-out on stream reader in uhttpsharp\HttpClient.cs When remote http client gets disconnected due to some network issues (or because of proxies in between not handling...

X Description: Looks like we are missing a time-out on stream reader in uhttpsharp\HttpClient.cs When remote http client gets disconnected due to some network issues (or because of proxies in between not handling...

Opengraph URL: https://github.com/Code-Sharp/uHttpSharp/issues/29

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"sockets end in close_wait state after some time","articleBody":"Looks like we are missing a time-out on stream reader in uhttpsharp\\HttpClient.cs\r\n\r\nWhen remote http client gets disconnected due to some network issues (or because of proxies in between not handling the keep-alive header properly), uHttpSharp library code fails to close the socket, this results in open sockets stuck in close_wait state.\r\nAm new to C# not sure how to add this time out.\r\n\r\n      {\r\n        try\r\n        {\r\n            await InitializeStream();\r\n\r\n            while (_client.Connected)\r\n            {\r\n                // TODO : Configuration.\r\n                var limitedStream = new NotFlushingStream(new LimitedStream(_stream));\r\n\r\n                var request = await _requestProvider.Provide(new MyStreamReader(limitedStream)).ConfigureAwait(false);\r\n\r\n                if (request != null)\r\n                {\r\n                    UpdateLastOperationTime();\r\n\r\n                    var context = new HttpContext(request, _client.RemoteEndPoint);\r\n\r\n                    Logger.InfoFormat(\"{1} : Got request {0}\", request.Uri, _client.RemoteEndPoint);\r\n\r\n\r\n                    await _requestHandler(context).ConfigureAwait(false);\r\n\r\n                    if (context.Response != null)\r\n                    {\r\n                        var streamWriter = new StreamWriter(limitedStream) { AutoFlush = false };\r\n                        streamWriter.NewLine = \"\\r\\n\";\r\n                        await WriteResponse(context, streamWriter).ConfigureAwait(false);\r\n\r\n                         //v----- connections seem to be stuck here, resulting in piling up of  sockets in close_wait state\r\n                        await limitedStream.ExplicitFlushAsync().ConfigureAwait(false); \r\n\r\n                        if (!request.Headers.KeepAliveConnection() || context.Response.CloseConnection)\r\n                        {\r\n                            _client.Close();\r\n                        }\r\n                    }\r\n\r\n                    UpdateLastOperationTime();\r\n                }\r\n                else\r\n                {\r\n                    _client.Close();\r\n                }\r\n            }\r\n        }\r\n        catch (Exception e)\r\n        {\r\n            // Hate people who make bad calls.\r\n            Logger.WarnException(string.Format(\"Error while serving : {0}\", _remoteEndPoint), e);\r\n            _client.Close();\r\n        }\r\n\r\n        Logger.InfoFormat(\"Lost Client {0}\", _remoteEndPoint);\r\n    }\r\n\r\n","author":{"url":"https://github.com/GopinathSadasivam","@type":"Person","name":"GopinathSadasivam"},"datePublished":"2019-06-07T07:11:56.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/29/uHttpSharp/issues/29"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:bf53f901-c36e-b956-03b9-607cf8244243
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC78A:18A62A:93E6D36:BF6EE4E:697608AD
html-safe-nonce998320814e9b422e528ba6c90e10c53bd2d93e38402a215e01b2a64ff0dc98a4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNzhBOjE4QTYyQTo5M0U2RDM2OkJGNkVFNEU6Njk3NjA4QUQiLCJ2aXNpdG9yX2lkIjoiNTgwMDU5NTc0NjMzNzgwOTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac7c1723facbf044b5dabc98e3e2401fcd0bf9fa66598795a33e82d48a50b5b6d3
hovercard-subject-tagissue:453370448
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/Code-Sharp/uHttpSharp/29/issue_layout
twitter:imagehttps://opengraph.githubassets.com/9e578a92cd1ac0e12a67b81c2386930c6cca5b5a2dfaf5cab7f1146654cc171e/Code-Sharp/uHttpSharp/issues/29
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9e578a92cd1ac0e12a67b81c2386930c6cca5b5a2dfaf5cab7f1146654cc171e/Code-Sharp/uHttpSharp/issues/29
og:image:altLooks like we are missing a time-out on stream reader in uhttpsharp\HttpClient.cs When remote http client gets disconnected due to some network issues (or because of proxies in between not handling...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameGopinathSadasivam
hostnamegithub.com
expected-hostnamegithub.com
Nonec6814b4cc7afd45cd6e64525d0cff0e76dd802f315a5b0e55a7abda1d1d070d0
turbo-cache-controlno-preview
go-importgithub.com/Code-Sharp/uHttpSharp git https://github.com/Code-Sharp/uHttpSharp.git
octolytics-dimension-user_id7625607
octolytics-dimension-user_loginCode-Sharp
octolytics-dimension-repository_id15547297
octolytics-dimension-repository_nwoCode-Sharp/uHttpSharp
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forktrue
octolytics-dimension-repository_parent_id2642421
octolytics-dimension-repository_parent_nwobonesoul/uhttpsharp
octolytics-dimension-repository_network_root_id2642421
octolytics-dimension-repository_network_root_nwobonesoul/uhttpsharp
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release4ea235bfed58ef16c8a5642b3ac64b74f10c9f52
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/Code-Sharp/uHttpSharp/issues/29#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FCode-Sharp%2FuHttpSharp%2Fissues%2F29
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FCode-Sharp%2FuHttpSharp%2Fissues%2F29
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=Code-Sharp%2FuHttpSharp
Reloadhttps://patch-diff.githubusercontent.com/Code-Sharp/uHttpSharp/issues/29
Reloadhttps://patch-diff.githubusercontent.com/Code-Sharp/uHttpSharp/issues/29
Reloadhttps://patch-diff.githubusercontent.com/Code-Sharp/uHttpSharp/issues/29
Code-Sharp https://patch-diff.githubusercontent.com/Code-Sharp
uHttpSharphttps://patch-diff.githubusercontent.com/Code-Sharp/uHttpSharp
bonesoul/uhttpsharphttps://patch-diff.githubusercontent.com/bonesoul/uhttpsharp
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2FCode-Sharp%2FuHttpSharp
Fork 49 https://patch-diff.githubusercontent.com/login?return_to=%2FCode-Sharp%2FuHttpSharp
Star 112 https://patch-diff.githubusercontent.com/login?return_to=%2FCode-Sharp%2FuHttpSharp
Code https://patch-diff.githubusercontent.com/Code-Sharp/uHttpSharp
Issues 15 https://patch-diff.githubusercontent.com/Code-Sharp/uHttpSharp/issues
Pull requests 2 https://patch-diff.githubusercontent.com/Code-Sharp/uHttpSharp/pulls
Actions https://patch-diff.githubusercontent.com/Code-Sharp/uHttpSharp/actions
Projects 0 https://patch-diff.githubusercontent.com/Code-Sharp/uHttpSharp/projects
Wiki https://patch-diff.githubusercontent.com/Code-Sharp/uHttpSharp/wiki
Security 0 https://patch-diff.githubusercontent.com/Code-Sharp/uHttpSharp/security
Insights https://patch-diff.githubusercontent.com/Code-Sharp/uHttpSharp/pulse
Code https://patch-diff.githubusercontent.com/Code-Sharp/uHttpSharp
Issues https://patch-diff.githubusercontent.com/Code-Sharp/uHttpSharp/issues
Pull requests https://patch-diff.githubusercontent.com/Code-Sharp/uHttpSharp/pulls
Actions https://patch-diff.githubusercontent.com/Code-Sharp/uHttpSharp/actions
Projects https://patch-diff.githubusercontent.com/Code-Sharp/uHttpSharp/projects
Wiki https://patch-diff.githubusercontent.com/Code-Sharp/uHttpSharp/wiki
Security https://patch-diff.githubusercontent.com/Code-Sharp/uHttpSharp/security
Insights https://patch-diff.githubusercontent.com/Code-Sharp/uHttpSharp/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/Code-Sharp/uHttpSharp/issues/29
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/Code-Sharp/uHttpSharp/issues/29
sockets end in close_wait state after some timehttps://patch-diff.githubusercontent.com/Code-Sharp/uHttpSharp/issues/29#top
https://github.com/GopinathSadasivam
https://github.com/GopinathSadasivam
GopinathSadasivamhttps://github.com/GopinathSadasivam
on Jun 7, 2019https://github.com/Code-Sharp/uHttpSharp/issues/29#issue-453370448
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.