add ctx to interfaces (#105)

* add ctx to interfaces

* use existing context
This commit is contained in:
David Colburn
2021-08-30 20:31:24 -05:00
committed by GitHub
parent 1e10d440c8
commit 1f1eea383f
17 changed files with 321 additions and 267 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
package service
import (
"context"
"crypto/tls"
"net"
"strconv"
@@ -96,7 +97,7 @@ func NewTurnServer(conf *config.Config, roomStore RoomStore, node routing.LocalN
func newTurnAuthHandler(roomStore RoomStore) turn.AuthHandler {
return func(username, realm string, srcAddr net.Addr) (key []byte, ok bool) {
// room id should be the username, create a hashed room id
rm, err := roomStore.LoadRoom(username)
rm, err := roomStore.LoadRoom(context.Background(), username)
if err != nil {
return nil, false
}