diff options
author | 2013-04-02 21:57:33 +0000 | |
---|---|---|
committer | 2013-04-02 21:57:33 +0000 | |
commit | 4ca3cc6ebf5b0aca097e1972420cdcc57c4ef4f4 (patch) | |
tree | abe60e66644ccebc5bb8b4e44078c97afc39fd09 /lib/libc | |
parent | Use __off_t instead of off_t to make this usable on its own even in our (diff) | |
download | wireguard-openbsd-4ca3cc6ebf5b0aca097e1972420cdcc57c4ef4f4.tar.xz wireguard-openbsd-4ca3cc6ebf5b0aca097e1972420cdcc57c4ef4f4.zip |
add comment for how EINPROGRESS is handled there.
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/asr/res_send_async.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libc/asr/res_send_async.c b/lib/libc/asr/res_send_async.c index 72154257d25..9f16aa4338b 100644 --- a/lib/libc/asr/res_send_async.c +++ b/lib/libc/asr/res_send_async.c @@ -1,4 +1,4 @@ -/* $OpenBSD: res_send_async.c,v 1.12 2013/04/02 16:38:37 eric Exp $ */ +/* $OpenBSD: res_send_async.c,v 1.13 2013/04/02 21:57:33 eric Exp $ */ /* * Copyright (c) 2012 Eric Faurot <eric@openbsd.org> * @@ -338,6 +338,11 @@ sockaddr_connect(const struct sockaddr *sa, int socktype) goto fail; if (connect(sock, sa, sa->sa_len) == -1) { + /* + * In the TCP case, the caller will be asked to poll for + * POLLOUT so that we start writing the packet in tcp_write() + * when the connection is established, or fail there on error. + */ if (errno == EINPROGRESS) return (sock); goto fail; |