luoyangwei 1 anno fa
parent
commit
9c951b16be
1 ha cambiato i file con 9 aggiunte e 9 eliminazioni
  1. 9 9
      server/server.go

+ 9 - 9
server/server.go

@@ -41,15 +41,15 @@ func (srv *Server) WebsocketHandler(ctx *gin.Context) {
 	}
 
 	// Check online status
-	if on, err := srv.Repositories.OnlineRepository.Is(ctx, id); err != nil {
-		zlog.Error(err)
-		ctx.AbortWithError(http.StatusInternalServerError, err)
-		return
-	} else if on {
-		zlog.Error("user is online")
-		ctx.AbortWithError(http.StatusBadRequest, eris.New("user is online"))
-		return
-	}
+	// if on, err := srv.Repositories.OnlineRepository.Is(ctx, id); err != nil {
+	// 	zlog.Error(err)
+	// 	ctx.AbortWithError(http.StatusInternalServerError, err)
+	// 	return
+	// } else if on {
+	// 	zlog.Error("user is online")
+	// 	ctx.AbortWithError(http.StatusBadRequest, eris.New("user is online"))
+	// 	return
+	// }
 
 	conn, err := srv.Upgrader.Upgrade(ctx.Writer, ctx.Request, nil)
 	if err != nil {