]> git.sesse.net Git - vlc/commitdiff
Also set SO_REUSEADDR here
authorRémi Denis-Courmont <rem@videolan.org>
Sun, 30 Apr 2006 17:19:29 +0000 (17:19 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Sun, 30 Apr 2006 17:19:29 +0000 (17:19 +0000)
src/network/tcp.c

index 23b30f15795559e2ae6a698d7c5096865456acf5..2d8aacd0173986a26ccfdf869686bb53c45d01aa 100644 (file)
@@ -423,6 +423,8 @@ int __net_Accept( vlc_object_t *p_this, int *pi_fd, mtime_t i_wait )
             }
             else
             {
+                const int yes = 1;
+                setsockopt( i_fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof( yes ));
 #ifdef FD_CLOEXEC
                 fcntl( i_fd, F_SETFD, FD_CLOEXEC );
 #endif