mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-04 13:53:26 +00:00
unix: Use rw_timeout for setting the connect timeout
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
136c3438bb
commit
3ee2ec5ec1
@ -73,6 +73,9 @@ static int unix_open(URLContext *h, const char *filename, int flags)
|
|||||||
if ((fd = ff_socket(AF_UNIX, s->type, 0)) < 0)
|
if ((fd = ff_socket(AF_UNIX, s->type, 0)) < 0)
|
||||||
return ff_neterrno();
|
return ff_neterrno();
|
||||||
|
|
||||||
|
if (s->timeout < 0 && h->rw_timeout)
|
||||||
|
s->timeout = h->rw_timeout / 1000;
|
||||||
|
|
||||||
if (s->listen) {
|
if (s->listen) {
|
||||||
ret = ff_listen_bind(fd, (struct sockaddr *)&s->addr,
|
ret = ff_listen_bind(fd, (struct sockaddr *)&s->addr,
|
||||||
sizeof(s->addr), s->timeout, h);
|
sizeof(s->addr), s->timeout, h);
|
||||||
|
Loading…
Reference in New Issue
Block a user