Fix Public API Breakage

stun.TransactionID can't be changed, reverting
for now.

Resolves pion/demo-conference#7
This commit is contained in:
Sean DuBois
2020-10-01 14:15:13 -07:00
committed by Sean DuBois
parent 85839ae560
commit 1d24ef2382
10 changed files with 34 additions and 36 deletions

View File

@@ -25,7 +25,7 @@ func keepAlive(c *stun.Client) {
// Keep-alive for NAT binding.
t := time.NewTicker(time.Second * 5)
for range t.C {
if err := c.Do(stun.MustBuild(stun.TransactionID(), stun.BindingRequest), func(res stun.Event) {
if err := c.Do(stun.MustBuild(stun.TransactionID, stun.BindingRequest), func(res stun.Event) {
if res.Error != nil {
panic(res.Error)
}
@@ -119,7 +119,7 @@ func main() {
// This can fail if your NAT Server is strict and will use separate ports
// for application data and STUN
var gotAddr stun.XORMappedAddress
if err = c.Do(stun.MustBuild(stun.TransactionID(), stun.BindingRequest), func(res stun.Event) {
if err = c.Do(stun.MustBuild(stun.TransactionID, stun.BindingRequest), func(res stun.Event) {
if res.Error != nil {
panic(res.Error)
}