- Add thread-safe header wrapper in timeoutWriter - Check context cancellation before writing responses in handlers - Protect header access after timeout with mutex - Prevents race condition when requests timeout while handlers are still running |
||
|---|---|---|
| .. | ||
| handlers.go | ||
| middleware.go | ||
| routes.go | ||
| server.go | ||