View definition

(*RequestCtx).TimeoutErrorWithCode

Defined in github.com/valyala/fasthttp/server.go

Description

TimeoutErrorWithCode sets response body to msg and response status code to statusCode.

All response modifications after TimeoutErrorWithCode call are ignored.

TimeoutErrorWithCode MUST be called before returning from RequestHandler if there are references to ctx and/or its members in other goroutines remain.

Usage of this function is discouraged. Prefer eliminating ctx references from pending goroutines instead of using this function.

TimeoutErrorWithCode is referenced in 1 repository

github.com/valyala/fasthttp