Skip to content

Commit

Permalink
disabled websocket (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
vvuwei committed Oct 31, 2023
1 parent 54a109d commit 6ab0cbb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmd/api/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ func initHandlers(ctx context.Context, e *echo.Echo, cfg Config, db postgres.Sto

v1.GET("/swagger/*", echoSwagger.WrapHandler)

initWebsocket(ctx, db, v1)
// initWebsocket(ctx, db, v1)

log.Info().Msg("API routes:")
for _, route := range e.Routes() {
Expand All @@ -300,8 +300,8 @@ var (
wsManager *websocket.Manager
)

func initWebsocket(ctx context.Context, db postgres.Storage, group *echo.Group) {
wsManager = websocket.NewManager(db, db.Blocks, db.Tx)
wsManager.Start(ctx)
group.GET("/ws", wsManager.Handle)
}
// func initWebsocket(ctx context.Context, db postgres.Storage, group *echo.Group) {
// wsManager = websocket.NewManager(db, db.Blocks, db.Tx)
// wsManager.Start(ctx)
// group.GET("/ws", wsManager.Handle)
// }

0 comments on commit 6ab0cbb

Please sign in to comment.