Add g_sck_set_reuseaddr()

Only set SO_REUSEADDR where it is actually required, which is
before most (but not all) bind() calls.
This commit is contained in:
matt335672
2025-01-09 12:46:27 +00:00
parent 984a0b2767
commit cad52028e0
4 changed files with 32 additions and 57 deletions
+1
View File
@@ -149,6 +149,7 @@ main_loop(char *local_port, char *remote_ip, char *remote_port, int hexdump)
else
{
g_tcp_set_non_blocking(lis_sck);
g_sck_set_reuseaddr(lis_sck);
error = g_tcp_bind(lis_sck, local_port);
}