[MM-40638] Type all of the websocket event names as a new type WebsocketEventType (#25454)
Co-authored-by: Sudheer Tripathi <sudheer@clearglass.com> Co-authored-by: Sudheer Tripathi <31629433+sudheer121@users.noreply.github.com> Co-authored-by: Sudheer Tripathi <tripathisudheer604@gmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
e1f72576fb
Коммит
51e73b681b
@@ -477,7 +477,7 @@ func (wc *WebConn) writePump() {
|
||||
logData := []mlog.Field{
|
||||
mlog.String("user_id", wc.UserId),
|
||||
mlog.String("conn_id", wc.GetConnectionID()),
|
||||
mlog.String("type", msg.EventType()),
|
||||
mlog.String("type", string(msg.EventType())),
|
||||
mlog.Int("size", buf.Len()),
|
||||
}
|
||||
if evtOk {
|
||||
@@ -735,7 +735,7 @@ func (wc *WebConn) ShouldSendEvent(msg *model.WebSocketEvent) bool {
|
||||
"websocket.slow: dropping message",
|
||||
mlog.String("user_id", wc.UserId),
|
||||
mlog.String("conn_id", wc.GetConnectionID()),
|
||||
mlog.String("type", msg.EventType()),
|
||||
mlog.String("type", string(msg.EventType())),
|
||||
)
|
||||
// Reset timer to now.
|
||||
wc.lastLogTimeSlow = time.Now()
|
||||
|
||||
Ссылка в новой задаче
Block a user