-
Couldn't load subscription status.
- Fork 182
Open
Labels
bugSomething isn't workingSomething isn't workingmuxUDP and TCP Mux related issuesUDP and TCP Mux related issues
Description
Your environment.
- Version: v2.2.12
What did you do?
I wrote sample code to simulcast multi-udp-mux for both of local and remote, such as two sfu cascade and they both use one signal udp port. And it CANNOT work
sample code
https://go.dev/play/p/PfDDj7VnV2g
What did you expect?
It should work
What happened?
I currently think the reason is current code only use remote address as key in map to save udpMuxedConn, but in this case, all of the remote address is same. But I haven't confirm whether the root cause is it or not.
func (m *UDPMuxDefault) registerConnForAddress(conn *udpMuxedConn, addr string) {
if m.IsClosed() {
return
}
m.addressMapMu.Lock()
defer m.addressMapMu.Unlock()
existing, ok := m.addressMap[addr]
if ok {
existing.removeAddress(addr)
}
m.addressMap[addr] = conn
m.params.Logger.Debugf("Registered %s for %s", addr, conn.params.Key)
}
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingmuxUDP and TCP Mux related issuesUDP and TCP Mux related issues