Skip to content

Commit

Permalink
message remove logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Mar 18, 2024
1 parent 74007b6 commit 36fd68a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions cmd/haobase/message/ws/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
"github.com/gorilla/websocket"
"github.com/yzimhao/trading_engine/types"
"github.com/yzimhao/trading_engine/types/token"
"github.com/yzimhao/trading_engine/utils/app"
)

const (
Expand Down Expand Up @@ -83,7 +82,7 @@ func (c *Client) readPump() {
_, message, err := c.conn.ReadMessage()
if err != nil {
if websocket.IsUnexpectedCloseError(err, websocket.CloseGoingAway, websocket.CloseAbnormalClosure) {
app.Logger.Errorf("[wss ] IsUnexpectedCloseError: %v", err)
// app.Logger.Errorf("[wss ] IsUnexpectedCloseError: %v", err)
}
break
}
Expand Down Expand Up @@ -170,7 +169,7 @@ func (c *Client) handleRecvData(body []byte) {
c.delAttr(attr)
}

app.Logger.Debugf("[wss] recv: %v attrs: %v", msg, c.attrs)
// app.Logger.Debugf("[wss] recv: %v attrs: %v", msg, c.attrs)
}

func (c *Client) setAttr(tag string) {
Expand Down
3 changes: 1 addition & 2 deletions cmd/haobase/message/ws/hub.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"sync"

"github.com/gin-gonic/gin"
"github.com/yzimhao/trading_engine/utils/app"
)

// Hub maintains the set of active clients and broadcasts messages to the
Expand Down Expand Up @@ -105,7 +104,7 @@ func (h *Hub) ServeWs(ctx *gin.Context) {

conn, err := upgrader.Upgrade(ctx.Writer, ctx.Request, nil)
if err != nil {
app.Logger.Errorf("[wss] upgrader.Upgrade %s", err)
// app.Logger.Errorf("[wss] upgrader.Upgrade %s", err)
return
}

Expand Down

0 comments on commit 36fd68a

Please sign in to comment.