Skip to content

Commit

Permalink
Merge branch 'main' into feat/shell-completion
Browse files Browse the repository at this point in the history
  • Loading branch information
Xemdo authored Jan 11, 2025
2 parents 49382ac + a14bb8b commit 271e0bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/events/types/gift/channel_gift.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (e Event) GenerateEvent(params events.MockEventParameters) (events.MockEven
BroadcasterUserID: params.ToUserID,
BroadcasterUserLogin: params.ToUserName,
BroadcasterUserName: params.ToUserName,
Tier: "1000",
Tier: params.Tier,
Total: int(params.Cost),
CumulativeTotal: &total,
IsAnonymous: params.IsAnonymous,
Expand Down
4 changes: 3 additions & 1 deletion internal/events/websocket/mock_server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,9 @@ func (ws *WebSocketServer) WsPageHandler(w http.ResponseWriter, r *http.Request)

mt, message, err := conn.ReadMessage()
if err != nil && ws.Status != 0 { // If server is shut down, clients should already be disconnectd.
log.Printf("read err [%v]: %v", client.clientName, err)
if _, ok := err.(*websocket.CloseError); !ok || websocket.IsUnexpectedCloseError(err, websocket.CloseNormalClosure) {
log.Printf("read err [%v]: %v", client.clientName, err)
}

ws.muClients.Lock()
client.CloseWithReason(closeClientDisconnected)
Expand Down

0 comments on commit 271e0bb

Please sign in to comment.