mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 03:59:43 +00:00
tcp: Try enabling SO_REUSEADDR when listening
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
641f4a885f
commit
b7c3772be8
@ -83,6 +83,8 @@ static int tcp_open(URLContext *h, const char *uri, int flags)
|
||||
|
||||
if (listen_socket) {
|
||||
int fd1;
|
||||
int reuse = 1;
|
||||
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse));
|
||||
ret = bind(fd, cur_ai->ai_addr, cur_ai->ai_addrlen);
|
||||
if (ret) {
|
||||
ret = ff_neterrno();
|
||||
|
Loading…
Reference in New Issue
Block a user