Skip to content

🪓 Code separation for utils (🧹clean code)#771

Merged
Fenny merged 5 commits into
gofiber:masterfrom
ReneWerner87:master
Sep 14, 2020
Merged

🪓 Code separation for utils (🧹clean code)#771
Fenny merged 5 commits into
gofiber:masterfrom
ReneWerner87:master

Conversation

@ReneWerner87
Copy link
Copy Markdown
Member

Co-authored-by: Fenny fenny@gofiber.io
Co-authored-by: Kiyon kiyon@gofiber.io

🪓 Code separation for utils (🧹clean code)

Co-authored-by: Fenny <fenny@gofiber.io>
Co-authored-by: Kiyon <kiyon@gofiber.io>
@ReneWerner87 ReneWerner87 requested a review from a team as a code owner September 14, 2020 08:25
@ReneWerner87 ReneWerner87 requested review from Fenny and thomasvvugt and removed request for a team September 14, 2020 08:25
ReneWerner87 and others added 4 commits September 14, 2020 10:27
Co-authored-by: Fenny <fenny@gofiber.io>
Co-authored-by: Kiyon <kiyon@gofiber.io>
Co-authored-by: Fenny <fenny@gofiber.io>
Co-authored-by: Kiyon <kiyon@gofiber.io>
Co-authored-by: Fenny <fenny@gofiber.io>
Co-authored-by: Kiyon <kiyon@gofiber.io>
Co-authored-by: Fenny <fenny@gofiber.io>
Co-authored-by: Kiyon <kiyon@gofiber.io>
@Fenny Fenny merged commit 9ffdad1 into gofiber:master Sep 14, 2020
gtoxlili pushed a commit to gtoxlili/fiber that referenced this pull request May 9, 2026
The "Working with RequestCtx and fasthttpctx" section and the Summary
bullet claimed that `RequestCtx.Done` closes when the client connection
ends. That is not what fasthttp actually does — `s.done` is the shared
server-wide channel and only closes on `Server.Shutdown`. Per-connection
disconnect detection is not currently provided by fasthttp.

Sources:
- valyala/fasthttp `server.go` comment on `RequestCtx.Done`:
  "RequestCtx.s.done is only closed when the server is shutting down"
- valyala/fasthttp#468, gofiber#771, gofiber#965 — upstream maintainers confirm in-handler
  client disconnect detection is not supported
- gofiber#805 (Fenny: "not possible nor efficient with fasthttp
  sync.pool design") and gofiber#1718 (same Q&A, closed with the same answer)
- gofiber#4145 — open proposal asking for the very capability the
  docs already advertised

Updates three spots in docs/guide/context.md:
1. The fasthttpctx paragraph — now describes the actual semantics and
   points readers to timeout / Flush-based detection for long handlers.
2. The "Context Cancellation with Goroutines" paragraph — drops the
   misleading "client disconnects" phrasing.
3. The Summary bullet — matches the corrected description.

Fixes gofiber#4263
gtoxlili pushed a commit to gtoxlili/fiber that referenced this pull request May 9, 2026
The "Working with RequestCtx and fasthttpctx" section and the Summary
bullet claimed that `RequestCtx.Done` closes when the client connection
ends. That is not what fasthttp actually does — `s.done` is the shared
server-wide channel and only closes on `Server.Shutdown`. Per-connection
disconnect detection is not currently provided by fasthttp.

Sources:
- valyala/fasthttp `server.go` comment on `RequestCtx.Done`:
  "RequestCtx.s.done is only closed when the server is shutting down"
- valyala/fasthttp#468, gofiber#771, gofiber#965 — upstream maintainers confirm in-handler
  client disconnect detection is not supported
- gofiber#805 (Fenny: "not possible nor efficient with fasthttp
  sync.pool design") and gofiber#1718 (same Q&A, closed with the same answer)
- gofiber#4145 — open proposal asking for the very capability the
  docs already advertised

Updates three spots in docs/guide/context.md:
1. The fasthttpctx paragraph — now describes the actual semantics and
   points readers to timeout / Flush-based detection for long handlers.
2. The "Context Cancellation with Goroutines" paragraph — drops the
   misleading "client disconnects" phrasing.
3. The Summary bullet — matches the corrected description.

Fixes gofiber#4263
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants