Skip to content

Commit

Permalink
Log event type
Browse files Browse the repository at this point in the history
  • Loading branch information
streamer45 committed Feb 18, 2022
1 parent d206cfd commit e7a307d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (p *Plugin) handleEvent(ev model.PluginClusterEvent) error {
go p.startSession(us, msg.SenderID)
case clusterMessageTypeDisconnect:
if us == nil {
return fmt.Errorf("session doesn't exist, userID=%q, channelID=%q", msg.UserID, msg.ChannelID)
return fmt.Errorf("session doesn't exist, ev=%s, userID=%q, channelID=%q", ev.Id, msg.UserID, msg.ChannelID)
}
p.LogDebug("disconnect event", "ChannelID", msg.ChannelID, "UserID", msg.UserID)
p.mut.Lock()
Expand All @@ -127,7 +127,7 @@ func (p *Plugin) handleEvent(ev model.PluginClusterEvent) error {
}
case clusterMessageTypeSignaling:
if us == nil {
return fmt.Errorf("session doesn't exist, userID=%q, channelID=%q", msg.UserID, msg.ChannelID)
return fmt.Errorf("session doesn't exist, ev=%s, userID=%q, channelID=%q", ev.Id, msg.UserID, msg.ChannelID)
}
if msg.ClientMessage.Type != clientMessageTypeSDP && msg.ClientMessage.Type != clientMessageTypeICE {
return fmt.Errorf("unexpected client message type %q", msg.ClientMessage.Type)
Expand All @@ -148,7 +148,7 @@ func (p *Plugin) handleEvent(ev model.PluginClusterEvent) error {
}
case clusterMessageTypeUserState:
if us == nil {
return fmt.Errorf("session doesn't exist, userID=%q, channelID=%q", msg.UserID, msg.ChannelID)
return fmt.Errorf("session doesn't exist, ev=%s, userID=%q, channelID=%q", ev.Id, msg.UserID, msg.ChannelID)
}
us.trackEnableCh <- (msg.ClientMessage.Type == clientMessageTypeMute)
default:
Expand Down

0 comments on commit e7a307d

Please sign in to comment.