0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-18 00:58:42 +00:00

sk_write bugfix for BSD.

This commit is contained in:
Ondrej Filip 2004-06-18 12:54:53 +00:00
parent b4d8a0c280
commit 09e4117cc1

View File

@ -1025,7 +1025,7 @@ sk_write(sock *s)
{ {
sockaddr sa; sockaddr sa;
fill_in_sockaddr(&sa, s->daddr, s->dport); fill_in_sockaddr(&sa, s->daddr, s->dport);
if (connect(s->fd, (struct sockaddr *) &sa, sizeof(sa)) >= 0) if (connect(s->fd, (struct sockaddr *) &sa, sizeof(sa)) >= 0 || errno == EISCONN)
sk_tcp_connected(s); sk_tcp_connected(s);
else if (errno != EINTR && errno != EAGAIN && errno != EINPROGRESS) else if (errno != EINTR && errno != EAGAIN && errno != EINPROGRESS)
s->err_hook(s, errno); s->err_hook(s, errno);