Skip to content

Commit

Permalink
Print warning when disabling SIO_UDP_CONNRESET fails.
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Bechard <[email protected]>
  • Loading branch information
dbechrd authored Sep 7, 2024
1 parent 3ffe69a commit f7c59df
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion netcode.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,10 @@ int netcode_socket_create( struct netcode_socket_t * s, struct netcode_address_t
#define SIO_UDP_CONNRESET _WSAIOW(IOC_VENDOR, 12)
BOOL bNewBehavior = FALSE;
DWORD dwBytesReturned = 0;
WSAIoctl( s->handle, SIO_UDP_CONNRESET, &bNewBehavior, sizeof(bNewBehavior), NULL, 0, &dwBytesReturned, NULL, NULL );
if ( WSAIoctl( s->handle, SIO_UDP_CONNRESET, &bNewBehavior, sizeof(bNewBehavior), NULL, 0, &dwBytesReturned, NULL, NULL ) != 0 )
{
netcode_printf( NETCODE_LOG_LEVEL_ERROR, "warning: failed to disable UDP port unreachable messages on socket\n" );
}
#endif

// force IPv6 only if necessary
Expand Down

0 comments on commit f7c59df

Please sign in to comment.