1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 12:23:53 +00:00

fix socket reuse logic in UdpListen::Listen()

This commit is contained in:
Marcos Slomp 2023-09-20 21:47:44 -07:00 committed by GitHub
parent 1491e5d708
commit 83b52d9a20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;