Merge pull request #10 from stweil/master

Fix some typos in comments and error messages (found by codespell)
This commit is contained in:
Joachim Bauch 2020-05-25 08:40:45 +02:00 committed by GitHub
commit 563658bf59
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View file

@ -249,7 +249,7 @@ func (m *HelloClientMessage) CheckValid() error {
return err return err
} }
default: default:
return fmt.Errorf("unsupport auth type") return fmt.Errorf("unsupported auth type")
} }
} }
return nil return nil

View file

@ -733,7 +733,7 @@ func (h *Hub) processHello(client *Client, message *ClientMessage) {
return 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() h.mu.Lock()
delete(h.expectHelloClients, client) delete(h.expectHelloClients, client)
h.mu.Unlock() h.mu.Unlock()

View file

@ -234,7 +234,7 @@ type JanusGateway struct {
Sessions map[uint64]*JanusSession Sessions map[uint64]*JanusSession
// Access to the Sessions map should be synchronized with the Gateway.Lock() // 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 sync.Mutex
conn *websocket.Conn conn *websocket.Conn
@ -578,7 +578,7 @@ type JanusSession struct {
Handles map[uint64]*JanusHandle Handles map[uint64]*JanusHandle
// Access to the Handles map should be synchronized with the Session.Lock() // 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 sync.Mutex
gateway *JanusGateway gateway *JanusGateway

View file

@ -1039,7 +1039,7 @@ retry:
case msg := <-wakeupChan: case msg := <-wakeupChan:
var message NatsMessage var message NatsMessage
if err := p.mcu.nats.Decode(msg, &message); err != nil { 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 goto wait
} else if message.Type != "connected" { } else if message.Type != "connected" {
log.Printf("Unsupported NATS message waiting for publisher %s: %+v\n", p.publisher, message) log.Printf("Unsupported NATS message waiting for publisher %s: %+v\n", p.publisher, message)