From 1a0a34949466e91fbe850171d33afd35d1969adf Mon Sep 17 00:00:00 2001 From: Zhuo Zhao Date: Sun, 30 Sep 2018 20:31:12 +0800 Subject: [PATCH] bugfix: Delete put(c) HandleContext This method "engine.pool.Put(c)" may put c twice in pool, this is a bug may cause a request with no response and another response with more than one response body. --- gin.go | 1 - 1 file changed, 1 deletion(-) diff --git a/gin.go b/gin.go index 11f6d94a..92c24ba2 100644 --- a/gin.go +++ b/gin.go @@ -336,7 +336,6 @@ func (engine *Engine) ServeHTTP(w http.ResponseWriter, req *http.Request) { func (engine *Engine) HandleContext(c *Context) { c.reset() engine.handleHTTPRequest(c) - engine.pool.Put(c) } func (engine *Engine) handleHTTPRequest(c *Context) {