mirror of
https://github.com/pion/stun.git
synced 2025-10-25 16:50:26 +08:00
Fix Public API Breakage
stun.TransactionID can't be changed, reverting for now. Resolves pion/demo-conference#7
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user