timeout icon indicating copy to clipboard operation
timeout copied to clipboard

Server core dump with `fatal error: concurrent map writes`

Open x-lambda opened this issue 2 years ago • 0 comments

I test gin-timeout, and it's ok

https://github.com/vearne/gin-timeout/blob/master/timeout.go#L33

                 cp := *c //nolint: govet
		c.Abort()

		// sync.Pool
		buffer := buffpool.GetBuff()
		tw := &TimeoutWriter{body: buffer, ResponseWriter: cp.Writer, h: make(http.Header)}
		tw.TimeoutOptions = defaultOptions

		//  ....

		cp.Writer = tw

So, Is it caused by gin reusing the ctx object?

x-lambda avatar Sep 20 '23 14:09 x-lambda