Skip to content

Commit ee47e67

Browse files
committed
Also retry socketpair on EINVAL on Windows
1 parent 356383b commit ee47e67

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/picos_io/picos_io.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,8 @@ module Unix = struct
440440
retries =
441441
match Unix.socketpair ?cloexec socket_domain socket_type mystery with
442442
| sockets -> sockets
443-
| exception Unix.Unix_error ((EACCES | EADDRINUSE | ENOENT), _, _)
443+
| exception
444+
Unix.Unix_error ((EACCES | EADDRINUSE | EINVAL | ENOENT), _, _)
444445
when 0 < retries ->
445446
socketpair_win32 ?cloexec socket_domain socket_type mystery
446447
(retries - 1)

0 commit comments

Comments
 (0)