Skip to content

Commit

Permalink
fix tryCount
Browse files Browse the repository at this point in the history
  • Loading branch information
EAShakhov authored and EAShakhov committed Sep 15, 2021
1 parent 87c3986 commit 110c3c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/utils/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ func ListenUDPInPortRange(portMin, portMax int, laddr *net.UDPAddr) (*net.UDPCon
portStart := rand.Intn(j-i+1) + i
portCurrent := portStart
tryCount := 10
if (portMax - portMin) > tryCount {
// it freezes
/*if (portMax - portMin) > tryCount {
tryCount = portMax - portMin
}
}*/
for {
tryCount -= 1
if tryCount < 0 {
Expand Down

0 comments on commit 110c3c8

Please sign in to comment.