for O_NONBLOCK connect(), the watt32 socket library returns EISCONN when 
connection is established
---

watt32 is a DOS/Windows BSD socket library.

it seems iOS suffers this EISCON problem too, but i am unsure why it hasn't 
been reported here before.
i don't have iOS device to test.
https://github.com/warmcat/libwebsockets/issues/17


 libavformat/network.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/network.c b/libavformat/network.c
index 5664455d18..783de34a98 100644
--- a/libavformat/network.c
+++ b/libavformat/network.c
@@ -475,7 +475,7 @@ int ff_connect_parallel(struct addrinfo *addrs, int 
timeout_ms_per_address,
                     last_err = ff_neterrno();
                 else if (last_err != 0)
                     last_err = AVERROR(last_err);
-                if (last_err == 0) {
+                if (last_err == 0 || last_err == AVERROR(EISCONN)) {
                     // Everything is ok, we seem to have a successful
                     // connection. Close other sockets and return this one.
                     for (j = 0; j < nb_attempts; j++)
-- 
2.17.1

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to