controlRequest if already is the host.

This commit is contained in:
Miroslav Šedivý 2020-12-02 10:47:20 +01:00
parent b7103ca809
commit 26c0fea840

View File

@ -25,6 +25,11 @@ func (h *MessageHandlerCtx) controlRelease(session types.Session) error {
}
func (h *MessageHandlerCtx) controlRequest(session types.Session) error {
if session.IsHost() {
h.logger.Debug().Str("id", session.ID()).Msg("is already the host")
return nil
}
// TODO: Allow implicit requests.
host := h.sessions.GetHost()
if host != nil {