diff options
author | trociny <trociny@FreeBSD.org> | 2011-03-17 21:02:14 +0000 |
---|---|---|
committer | trociny <trociny@FreeBSD.org> | 2011-03-17 21:02:14 +0000 |
commit | 66e5107b571ac3e5cd2a0b66c0d805d2e6072201 (patch) | |
tree | cd8ed08209d32f881cc54fe7452a16ee305e8860 /sbin/hastd/secondary.c | |
parent | 6f3e84b7408a26889c512ddf8dc7b7f623415038 (diff) | |
download | FreeBSD-src-66e5107b571ac3e5cd2a0b66c0d805d2e6072201.zip FreeBSD-src-66e5107b571ac3e5cd2a0b66c0d805d2e6072201.tar.gz |
For secondary, set 2 * HAST_KEEPALIVE seconds timeout for incoming
connection so the worker will exit if it does not receive packets from
the primary during this interval.
Reported by: Christian Vogt <Christian.Vogt@haw-hamburg.de>
Tested by: Christian Vogt <Christian.Vogt@haw-hamburg.de>
Approved by: pjd (mentor)
MFC after: 1 week
Diffstat (limited to 'sbin/hastd/secondary.c')
-rw-r--r-- | sbin/hastd/secondary.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/hastd/secondary.c b/sbin/hastd/secondary.c index 46fa6f3..218c802 100644 --- a/sbin/hastd/secondary.c +++ b/sbin/hastd/secondary.c @@ -418,7 +418,7 @@ hastd_secondary(struct hast_resource *res, struct nv *nvin) PJDLOG_VERIFY(sigprocmask(SIG_SETMASK, &mask, NULL) == 0); /* Error in setting timeout is not critical, but why should it fail? */ - if (proto_timeout(res->hr_remotein, 0) < 0) + if (proto_timeout(res->hr_remotein, 2 * HAST_KEEPALIVE) < 0) pjdlog_errno(LOG_WARNING, "Unable to set connection timeout"); if (proto_timeout(res->hr_remoteout, res->hr_timeout) < 0) pjdlog_errno(LOG_WARNING, "Unable to set connection timeout"); |