From 859ba9ec2cc1a1c7d6722b2e63f6782624f3f3b7 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sat, 23 May 2020 09:35:00 +0200 Subject: [PATCH] Fix some typos in comments and error messages (found by codespell) Signed-off-by: Stefan Weil --- src/signaling/api_signaling.go | 2 +- src/signaling/hub.go | 2 +- src/signaling/janus_client.go | 4 ++-- src/signaling/mcu_janus.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/signaling/api_signaling.go b/src/signaling/api_signaling.go index a4af9e0..f6b2350 100644 --- a/src/signaling/api_signaling.go +++ b/src/signaling/api_signaling.go @@ -249,7 +249,7 @@ func (m *HelloClientMessage) CheckValid() error { return err } default: - return fmt.Errorf("unsupport auth type") + return fmt.Errorf("unsupported auth type") } } return nil diff --git a/src/signaling/hub.go b/src/signaling/hub.go index 04ade13..ae2e643 100644 --- a/src/signaling/hub.go +++ b/src/signaling/hub.go @@ -733,7 +733,7 @@ func (h *Hub) processHello(client *Client, message *ClientMessage) { return } - // Make sure client doesn't get disconencted while calling auth backend. + // Make sure client doesn't get disconnected while calling auth backend. h.mu.Lock() delete(h.expectHelloClients, client) h.mu.Unlock() diff --git a/src/signaling/janus_client.go b/src/signaling/janus_client.go index f10e6b6..4d98358 100644 --- a/src/signaling/janus_client.go +++ b/src/signaling/janus_client.go @@ -234,7 +234,7 @@ type JanusGateway struct { Sessions map[uint64]*JanusSession // Access to the Sessions map should be synchronized with the Gateway.Lock() - // and Gateway.Unlock() methods provided by the embeded sync.Mutex. + // and Gateway.Unlock() methods provided by the embedded sync.Mutex. sync.Mutex conn *websocket.Conn @@ -578,7 +578,7 @@ type JanusSession struct { Handles map[uint64]*JanusHandle // Access to the Handles map should be synchronized with the Session.Lock() - // and Session.Unlock() methods provided by the embeded sync.Mutex. + // and Session.Unlock() methods provided by the embedded sync.Mutex. sync.Mutex gateway *JanusGateway diff --git a/src/signaling/mcu_janus.go b/src/signaling/mcu_janus.go index a709b34..78db934 100644 --- a/src/signaling/mcu_janus.go +++ b/src/signaling/mcu_janus.go @@ -1039,7 +1039,7 @@ retry: case msg := <-wakeupChan: var message NatsMessage if err := p.mcu.nats.Decode(msg, &message); err != nil { - log.Printf("Error decoding wakup NATS message %s (%s)\n", string(msg.Data), err) + log.Printf("Error decoding wakeup NATS message %s (%s)\n", string(msg.Data), err) goto wait } else if message.Type != "connected" { log.Printf("Unsupported NATS message waiting for publisher %s: %+v\n", p.publisher, message)