mirror of
https://github.com/nonoo/kappanhang.git
synced 2026-04-07 15:33:54 +00:00
Use the same local and remote ports
This commit is contained in:
parent
5ce78b74d1
commit
8b2f47d13e
1 changed files with 6 additions and 1 deletions
|
|
@ -86,7 +86,12 @@ func (s *streamCommon) open(name string, portNumber int) {
|
|||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
s.conn, err = net.DialUDP("udp", nil, raddr)
|
||||
|
||||
// Use the same local and remote port. The radio does not handle different ports well.
|
||||
l := net.UDPAddr{
|
||||
Port: portNumber,
|
||||
}
|
||||
s.conn, err = net.DialUDP("udp", &l, raddr)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue