ws2_32: Handle EISCONN from sendmsg.

When calling sendmsg on a socket that's already connected, some
implementations will return EISCONN if you specify a recipient
(notably, Darwin/OSX with UDP connections). Newer versions of Linux
and Windows will simply ignore the destination parameter.

Signed-off-by: Rob Hughes <rbhughes@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rob Hughes 2019-03-12 16:14:19 +00:00 committed by Alexandre Julliard
parent e88084f650
commit b9591e21cf
1 changed files with 6 additions and 0 deletions

View File

@ -2628,6 +2628,12 @@ static int WS2_send( int fd, struct ws2_async *wsa, int flags )
while ((ret = sendmsg(fd, &hdr, flags)) == -1)
{
if (errno == EISCONN)
{
hdr.msg_name = 0;
hdr.msg_namelen = 0;
continue;
}
if (errno != EINTR)
return -1;
}