func WsConnectionHandle(ctx *gin.Context){
ws, err := upgrader.Upgrade(ctx.Writer, ctx.Request, nil)
if err != nil{
config.Error.Println("connect err", err.Error())
//config.Error.Fatalln("connect err")
ctx.Abort()
}
...
when I use ctx.Abort()
it still ran the code below, and if I use Fatalln, my main process will stop~
and this is my router
gin.SetMode(gin.ReleaseMode)
route := gin.Default()
resource.User(route.Group("/api/user"))
resource.KingAngAngle(route.Group("/api/king-and-angle", resource.JWTAuth()))
resource.Blessing(route.Group("/api/blessing", resource.JWTAuth()))
route.GET("/ws", chat.WsConnectionHandle)