aboutsummaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>2006-10-30 18:29:24 +0000
committerPawel Jakub Dawidek <pjd@FreeBSD.org>2006-10-30 18:29:24 +0000
commita930f272def8f4c8915467084eb0c2222b39c86c (patch)
treecea99199e5516eee113ea8f84ad1c8f8eaeaf998 /sbin
parent91c878a6935c5c2e99866eb267e5bc3028bf6d2f (diff)
downloadsrc-a930f272def8f4c8915467084eb0c2222b39c86c.tar.gz
src-a930f272def8f4c8915467084eb0c2222b39c86c.zip
Notes
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ggate/shared/ggate.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sbin/ggate/shared/ggate.c b/sbin/ggate/shared/ggate.c
index c8428a66b601..510109238ac3 100644
--- a/sbin/ggate/shared/ggate.c
+++ b/sbin/ggate/shared/ggate.c
@@ -250,8 +250,12 @@ g_gate_send(int s, const void *buf, size_t len, int flags)
ssize_t
g_gate_recv(int s, void *buf, size_t len, int flags)
{
+ ssize_t done;
- return (recv(s, buf, len, flags));
+ do {
+ done = recv(s, buf, len, flags);
+ } while (done == -1 && errno == EAGAIN);
+ return (done);
}
int nagle = 1;
@@ -280,7 +284,7 @@ g_gate_socket_settings(int sfd)
bsize = sndbuf;
if (setsockopt(sfd, SOL_SOCKET, SO_SNDBUF, &bsize, sizeof(bsize)) == -1)
g_gate_xlog("setsockopt(SO_SNDBUF): %s.", strerror(errno));
- tv.tv_sec = 1;
+ tv.tv_sec = 8;
tv.tv_usec = 0;
if (setsockopt(sfd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv)) == -1) {
g_gate_log(LOG_ERR, "setsockopt(SO_SNDTIMEO) error: %s.",