code indentation.

This commit is contained in:
Miroslav Šedivý 2020-11-16 17:48:10 +01:00
parent 234b0a2e06
commit b411675108
2 changed files with 13 additions and 11 deletions

View File

@ -17,13 +17,14 @@ func (h *MessageHandlerCtx) screenSet(session types.Session, payload *message.Sc
return err
}
if err := h.sessions.Broadcast(message.ScreenResolution{
Event: event.SCREEN_RESOLUTION,
ID: session.ID(),
Width: payload.Width,
Height: payload.Height,
Rate: payload.Rate,
}, nil); err != nil {
if err := h.sessions.Broadcast(
message.ScreenResolution{
Event: event.SCREEN_RESOLUTION,
ID: session.ID(),
Width: payload.Width,
Height: payload.Height,
Rate: payload.Rate,
}, nil); err != nil {
h.logger.Warn().Err(err).Msgf("sending event %s has failed", event.SCREEN_RESOLUTION)
return err
}

View File

@ -85,10 +85,11 @@ func (h *MessageHandlerCtx) SessionDisconnected(session types.Session) error {
// clear host if exists
if session.IsHost() {
h.sessions.ClearHost()
if err := h.sessions.Broadcast(message.Control{
Event: event.CONTROL_RELEASE,
ID: session.ID(),
}, nil); err != nil {
if err := h.sessions.Broadcast(
message.Control{
Event: event.CONTROL_RELEASE,
ID: session.ID(),
}, nil); err != nil {
h.logger.Warn().Err(err).Msgf("broadcasting event %s has failed", event.CONTROL_RELEASE)
}
}