Skip to content

Commit

Permalink
fix socket reuse logic in UdpListen::Listen()
Browse files Browse the repository at this point in the history
  • Loading branch information
slomp authored Sep 21, 2023
1 parent 1491e5d commit 83b52d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public/common/TracySocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -678,10 +678,10 @@ bool UdpListen::Listen( uint16_t port )
#endif
#if defined _WIN32
unsigned long reuse = 1;
setsockopt( m_sock, SOL_SOCKET, SO_REUSEADDR, (const char*)&reuse, sizeof( reuse ) );
setsockopt( sock, SOL_SOCKET, SO_REUSEADDR, (const char*)&reuse, sizeof( reuse ) );
#else
int reuse = 1;
setsockopt( m_sock, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof( reuse ) );
setsockopt( sock, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof( reuse ) );
#endif
#if defined _WIN32
unsigned long broadcast = 1;
Expand Down

0 comments on commit 83b52d9

Please sign in to comment.