gin
gin copied to clipboard
fix: gin Context check nil engine
https://github.com/golang/go/blob/release-branch.go1.16/src/database/sql/sql.go#L1205 https://github.com/gin-gonic/gin/blob/v1.8.1/context.go#L1168 https://github.com/gin-gonic/gin/blob/v1.7.1/context.go#L1157
use gin.Context{} to database conn ctx param, if use v1.8.1 c.engine =nil panic then recover, un free lock conn; next time to conn lock, always wait lock to free; if use v1.7.* is ok; so gin cxt.Done() to check e.engine=nil, Compatible with this case.