René's URL Explorer Experiment


Title: fix: stop the first Close from returning net.ErrClosed by mafredri · Pull Request #564 · coder/websocket · GitHub

Open Graph Title: fix: stop the first Close from returning net.ErrClosed by mafredri · Pull Request #564 · coder/websocket

X Title: fix: stop the first Close from returning net.ErrClosed by mafredri · Pull Request #564 · coder/websocket

Description: Minimal and idiomatic WebSocket library for Go. Contribute to coder/websocket development by creating an account on GitHub.

Open Graph Description: The first call to Close or CloseNow could return failed to close WebSocket: use of closed network connection even when the connection had closed normally. This happens when the library closes the c...

X Description: The first call to Close or CloseNow could return failed to close WebSocket: use of closed network connection even when the connection had closed normally. This happens when the library closes the c...

Opengraph URL: https://github.com/coder/websocket/pull/564

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:77816017-6735-0ed3-4d4d-dc8734f0256d
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB4E8:1D4BD6:7198EB:9FE1BC:6B044CC8
html-safe-nonce4cbb85f238e8eaaeb7e565ce1a0cb3badccc493a1c0d07c16c0824f4c0fd56b0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNEU4OjFENEJENjo3MTk4RUI6OUZFMUJDOjZCMDQ0Q0M4IiwidmlzaXRvcl9pZCI6IjcwNzg1NjU3MDU3NTg4MjE1NzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac26e85046d53fc0c91c75ebaf63dcad59c1c2f7770b9952450a452032781c239a
hovercard-subject-tagpull_request:3729774270
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/coder/websocket/564/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/dc2cd55c57cdde9a2bdd941411297fde199642e7784e3a6a6a9a8d632f48dd5b/coder/websocket/pull/564
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/dc2cd55c57cdde9a2bdd941411297fde199642e7784e3a6a6a9a8d632f48dd5b/coder/websocket/pull/564
og:image:altThe first call to Close or CloseNow could return failed to close WebSocket: use of closed network connection even when the connection had closed normally. This happens when the library closes the c...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemafredri
hostnamegithub.com
expected-hostnamegithub.com
None002aa6b95ffa730b0aec436a5c383f536ad677284e60056037fb120afe37b730
turbo-cache-controlno-cache
go-importgithub.com/coder/websocket git https://github.com/coder/websocket.git
octolytics-dimension-user_id95932066
octolytics-dimension-user_logincoder
octolytics-dimension-repository_id144590177
octolytics-dimension-repository_nwocoder/websocket
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id144590177
octolytics-dimension-repository_network_root_nwocoder/websocket
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
release059f24c781e3a0d7df3f27a97da0e93fab06ae39
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/coder/websocket/pull/564#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fwebsocket%2Fpull%2F564
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fwebsocket%2Fpull%2F564
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=coder%2Fwebsocket
Reloadhttps://github.com/coder/websocket/pull/564
Reloadhttps://github.com/coder/websocket/pull/564
Reloadhttps://github.com/coder/websocket/pull/564
coderhttps://github.com/coder
websockethttps://github.com/coder/websocket
Codehttps://github.com/coder/websocket
Issues59 (59)https://github.com/coder/websocket/issues
Pull requests27 (27)https://github.com/coder/websocket/pulls
Actionshttps://github.com/coder/websocket/actions
Security and qualityhttps://github.com/coder/websocket/security
Insightshttps://github.com/coder/websocket/insights
https://github.com/coder/websocket
mafredrihttps://github.com/mafredri
masterhttps://github.com/coder/websocket/tree/master
mafredri/fix-close-race-net-errclosedhttps://github.com/coder/websocket/tree/mafredri/fix-close-race-net-errclosed
Conversationhttps://github.com/coder/websocket/pull/564
Commits4 (4)https://github.com/coder/websocket/pull/564/commits
Checkshttps://github.com/coder/websocket/pull/564/checks
Files changedhttps://github.com/coder/websocket/pull/564/files
fix: stop the first Close from returning net.ErrClosedhttps://github.com/coder/websocket/pull/564#top
mafredrihttps://github.com/mafredri
masterhttps://github.com/coder/websocket/tree/master
mafredri/fix-close-race-net-errclosedhttps://github.com/coder/websocket/tree/mafredri/fix-close-race-net-errclosed
https://github.com/mafredri
mafredrihttps://github.com/mafredri
May 22, 2026https://github.com/coder/websocket/pull/564#issue-4502006596
Please reload this pagehttps://github.com/coder/websocket/pull/564
coder/internal#1541https://github.com/coder/internal/issues/1541
Please reload this pagehttps://github.com/coder/websocket/pull/564
https://github.com/mafredri
mafredrihttps://github.com/mafredri
force-pushedhttps://github.com/coder/websocket/compare/b76fd5d8adca1a0749fc3b3f91824e29ca07a0cc..e5aa4237b1f688b7331a06abb723770940eaae90
b76fd5dhttps://github.com/coder/websocket/commit/b76fd5d8adca1a0749fc3b3f91824e29ca07a0cc
e5aa423https://github.com/coder/websocket/commit/e5aa4237b1f688b7331a06abb723770940eaae90
Compare https://github.com/coder/websocket/compare/b76fd5d8adca1a0749fc3b3f91824e29ca07a0cc..e5aa4237b1f688b7331a06abb723770940eaae90
May 22, 2026 11:13https://github.com/coder/websocket/pull/564#event-25848578005
https://github.com/mafredri
mafredrihttps://github.com/mafredri
May 22, 2026https://github.com/coder/websocket/pull/564#issuecomment-4519513731
Please reload this pagehttps://github.com/coder/websocket/pull/564
https://github.com/apps/coder-agents-review
coder-agents-reviewhttps://github.com/apps/coder-agents-review
May 22, 2026https://github.com/coder/websocket/pull/564#issuecomment-4519514233
Please reload this pagehttps://github.com/coder/websocket/pull/564
Chathttps://dev.coder.com/agents/1a28b3d9-55e0-4758-98e4-6553e8ced17f
@mafredrihttps://github.com/mafredri
Reviewhttps://github.com/coder/websocket/pull/564#pullrequestreview-4346377952
d099e16..e5aa423https://github.com/coder/websocket/compare/d099e1621e8d0f080c9f3b87c5a8587e0b722723...e5aa4237b1f688b7331a06abb723770940eaae90
Reviewhttps://github.com/coder/websocket/pull/564#pullrequestreview-4346377952
d099e16https://github.com/coder/websocket/commit/d099e1621e8d0f080c9f3b87c5a8587e0b722723
e5aa423https://github.com/coder/websocket/commit/e5aa4237b1f688b7331a06abb723770940eaae90
Coder Agentshttps://coder.com
Please reload this pagehttps://github.com/coder/websocket/pull/564
https://github.com/apps/coder-agents-review
coder-agents-reviewhttps://github.com/apps/coder-agents-review
May 22, 2026 https://github.com/coder/websocket/pull/564#pullrequestreview-4346377952
View reviewed changes https://github.com/coder/websocket/pull/564/files
coder-agents-reviewhttps://github.com/apps/coder-agents-review
https://github.com/coder/websocket/pull/564#pullrequestreview-4346377952
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/coder/websocket/pull/564
close.gohttps://github.com/coder/websocket/pull/564/files#diff-e388b94dc680f496cb6026bdaecce464a253c5a9802871e472dcc78f98d5a549
coder-agents-reviewhttps://github.com/apps/coder-agents-review
May 22, 2026https://github.com/coder/websocket/pull/564#discussion_r3289163420
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/coder/websocket/pull/564
close.gohttps://github.com/coder/websocket/pull/564/files#diff-e388b94dc680f496cb6026bdaecce464a253c5a9802871e472dcc78f98d5a549
coder-agents-reviewhttps://github.com/apps/coder-agents-review
May 22, 2026https://github.com/coder/websocket/pull/564#discussion_r3289163425
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/coder/websocket/pull/564
conn.gohttps://github.com/coder/websocket/pull/564/files#diff-4f427d2b022907c552328e63f137561f6de92396d7a6e8f6c2ea1bcf0db52654
coder-agents-reviewhttps://github.com/apps/coder-agents-review
May 22, 2026https://github.com/coder/websocket/pull/564#discussion_r3289163428
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/coder/websocket/pull/564
conn.gohttps://github.com/coder/websocket/pull/564/files#diff-4f427d2b022907c552328e63f137561f6de92396d7a6e8f6c2ea1bcf0db52654
coder-agents-reviewhttps://github.com/apps/coder-agents-review
May 22, 2026https://github.com/coder/websocket/pull/564#discussion_r3289163432
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/coder/websocket/pull/564
conn.gohttps://github.com/coder/websocket/pull/564/files#diff-4f427d2b022907c552328e63f137561f6de92396d7a6e8f6c2ea1bcf0db52654
coder-agents-reviewhttps://github.com/apps/coder-agents-review
May 22, 2026https://github.com/coder/websocket/pull/564#discussion_r3289163436
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/coder/websocket/pull/564
close.gohttps://github.com/coder/websocket/pull/564/files#diff-e388b94dc680f496cb6026bdaecce464a253c5a9802871e472dcc78f98d5a549
coder-agents-reviewhttps://github.com/apps/coder-agents-review
May 22, 2026https://github.com/coder/websocket/pull/564#discussion_r3289163440
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/coder/websocket/pull/564
https://github.com/apps/coderabbitai
coderabbitaihttps://github.com/apps/coderabbitai
Aug 4, 2026 https://github.com/coder/websocket/pull/564#ref-pullrequest-5061677673
OSAC-3544: Report WebSocket console errors as close frames osac-project/osac#138 https://github.com/osac-project/osac/pull/138
https://github.com/mafredri
mafredrihttps://github.com/mafredri
force-pushedhttps://github.com/coder/websocket/compare/e5aa4237b1f688b7331a06abb723770940eaae90..21b8e2a7f5a90327ce192983512cc4a63a7331bf
e5aa423https://github.com/coder/websocket/commit/e5aa4237b1f688b7331a06abb723770940eaae90
21b8e2ahttps://github.com/coder/websocket/commit/21b8e2a7f5a90327ce192983512cc4a63a7331bf
Compare https://github.com/coder/websocket/compare/e5aa4237b1f688b7331a06abb723770940eaae90..21b8e2a7f5a90327ce192983512cc4a63a7331bf
October 28, 2026 15:55https://github.com/coder/websocket/pull/564#event-34493403791
https://github.com/mafredri
mafredrihttps://github.com/mafredri
Oct 28, 2026https://github.com/coder/websocket/pull/564#event-34493445229
https://github.com/mafredri
mafredrihttps://github.com/mafredri
force-pushedhttps://github.com/coder/websocket/compare/21b8e2a7f5a90327ce192983512cc4a63a7331bf..60b4584e4d22478b8b6bd96933a08b0ceab7b2a1
21b8e2ahttps://github.com/coder/websocket/commit/21b8e2a7f5a90327ce192983512cc4a63a7331bf
60b4584https://github.com/coder/websocket/commit/60b4584e4d22478b8b6bd96933a08b0ceab7b2a1
Compare https://github.com/coder/websocket/compare/21b8e2a7f5a90327ce192983512cc4a63a7331bf..60b4584e4d22478b8b6bd96933a08b0ceab7b2a1
November 3, 2026 19:14https://github.com/coder/websocket/pull/564#event-35055939317
https://github.com/mafredri
mafredrihttps://github.com/mafredri
Nov 3, 2026https://github.com/coder/websocket/pull/564#issuecomment-6613222928
Please reload this pagehttps://github.com/coder/websocket/pull/564
https://github.com/apps/linear-code
linear-codehttps://github.com/apps/linear-code
Nov 17, 2026https://github.com/coder/websocket/pull/564#issuecomment-6946999836
CODAGT-1601https://linear.app/codercom/issue/CODAGT-1601
Please reload this pagehttps://github.com/coder/websocket/pull/564
mafredrihttps://github.com/mafredri
November 20, 2026 14:35https://github.com/coder/websocket/pull/564#commits-pushed-861f56d
https://github.com/mafredri
fix: suppress net.ErrClosed on concurrent Closehttps://github.com/coder/websocket/pull/564/commits/861f56d84985df85f2c01c24b308b5b36e6ad5b7
861f56dhttps://github.com/coder/websocket/pull/564/commits/861f56d84985df85f2c01c24b308b5b36e6ad5b7
https://github.com/mafredri
fix: keep library closes from failing the first Closehttps://github.com/coder/websocket/pull/564/commits/9a5805542a1448163b8db67629120614043258a9
9a58055https://github.com/coder/websocket/pull/564/commits/9a5805542a1448163b8db67629120614043258a9
https://github.com/mafredri
fix: keep browser closes from failing the first Close on Wasmhttps://github.com/coder/websocket/pull/564/commits/aca462558843b1cf36a4621c6454908919f5c7e9
aca4625https://github.com/coder/websocket/pull/564/commits/aca462558843b1cf36a4621c6454908919f5c7e9
https://github.com/mafredri
mafredrihttps://github.com/mafredri
force-pushedhttps://github.com/coder/websocket/compare/60b4584e4d22478b8b6bd96933a08b0ceab7b2a1..aca462558843b1cf36a4621c6454908919f5c7e9
60b4584https://github.com/coder/websocket/commit/60b4584e4d22478b8b6bd96933a08b0ceab7b2a1
aca4625https://github.com/coder/websocket/commit/aca462558843b1cf36a4621c6454908919f5c7e9
Compare https://github.com/coder/websocket/compare/60b4584e4d22478b8b6bd96933a08b0ceab7b2a1..aca462558843b1cf36a4621c6454908919f5c7e9
November 20, 2026 14:42https://github.com/coder/websocket/pull/564#event-36779584752
https://github.com/mafredri
fix: keep wsjson.Read's close from failing the first Closehttps://github.com/coder/websocket/pull/564/commits/538ba5c200f13fac01efd9dee88880c3f04ba1a8
538ba5chttps://github.com/coder/websocket/pull/564/commits/538ba5c200f13fac01efd9dee88880c3f04ba1a8
https://github.co/hiddenchars
https://github.com/coder/websocket/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fwebsocket%2Fpull%2F564
https://github.com/apps/coder-agents-review
coder-agents-review[bot] https://github.com/apps/coder-agents-review
https://github.com/coder/websocket/pull/564/files/e5aa4237b1f688b7331a06abb723770940eaae90
Please reload this pagehttps://github.com/coder/websocket/pull/564
Please reload this pagehttps://github.com/coder/websocket/pull/564
https://github.com/mafredri
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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.