mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
code indentation.
This commit is contained in:
parent
234b0a2e06
commit
b411675108
@ -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
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user