Fix deprecated event handling

This commit is contained in:
Zoltán Papp
2025-02-28 12:24:44 +01:00
parent 4a5edc1374
commit 4e33582aaa
5 changed files with 55 additions and 56 deletions

View File

@@ -10,6 +10,7 @@ import (
"runtime"
"sync"
"time"
"unsafe"
"github.com/pion/ice/v3"
log "github.com/sirupsen/logrus"
@@ -26,6 +27,8 @@ import (
semaphoregroup "github.com/netbirdio/netbird/util/semaphore-group"
)
type ConnID unsafe.Pointer
type ConnPriority int
func (cp ConnPriority) String() string {
@@ -297,6 +300,10 @@ func (conn *Conn) GetKey() string {
return conn.config.Key
}
func (conn *Conn) ConnID() ConnID {
return ConnID(conn)
}
// configureConnection starts proxying traffic from/to local Wireguard and sets connection status to StatusConnected
func (conn *Conn) onICEConnectionIsReady(priority ConnPriority, iceConnInfo ICEConnInfo) {
conn.mu.Lock()