mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-25 17:43:38 +01:00
Fix error handling in case of the port is in used (#810)
This commit is contained in:
parent
9f35a7fb8d
commit
1803cf3678
@ -75,7 +75,7 @@ func (b *ICEBind) Open(uport uint16) ([]conn.ReceiveFunc, uint16, error) {
|
|||||||
portAddr.Port(), nil
|
portAddr.Port(), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func listenNet(network string, port int) (*net.UDPConn, int, error) {
|
func listenNet(network string, port int) (net.PacketConn, int, error) {
|
||||||
c, err := net.ListenUDP(network, &net.UDPAddr{Port: port})
|
c, err := net.ListenUDP(network, &net.UDPAddr{Port: port})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, 0, err
|
return nil, 0, err
|
||||||
|
Loading…
Reference in New Issue
Block a user