Skip to content

Commit

Permalink
[core] Fix negative id when wrap around
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaozhihong authored and maxsharabayko committed Jan 23, 2023
1 parent bb7472f commit 5f02310
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions srtcore/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ SRTSOCKET srt::CUDTUnited::generateSocketID(bool for_group)
// We have a rollover on the socket value, so
// definitely we haven't made the Columbus mistake yet.
m_SocketIDGenerator = MAX_SOCKET_VAL;
sockval = MAX_SOCKET_VAL;
}

// Check all sockets if any of them has this value.
Expand Down

0 comments on commit 5f02310

Please sign in to comment.