refactored config and room setup

This commit is contained in:
David Zhao
2020-10-15 00:04:16 -07:00
parent 32af882b99
commit 40c7d902d8
10 changed files with 386 additions and 71 deletions
+2 -2
View File
@@ -47,10 +47,10 @@ func NewLocalNode(conf *config.Config) (*Node, error) {
}
func (n *Node) DiscoverNetworkInfo() error {
if len(n.config.StunServers) == 0 {
if len(n.config.RTC.StunServers) == 0 {
return errors.New("STUN servers are required but not defined")
}
c, err := stun.Dial("udp", n.config.StunServers[0])
c, err := stun.Dial("udp", n.config.RTC.StunServers[0])
if err != nil {
return err
}