diff options
author | Mikolaj Golub <trociny@FreeBSD.org> | 2011-03-17 21:02:14 +0000 |
---|---|---|
committer | Mikolaj Golub <trociny@FreeBSD.org> | 2011-03-17 21:02:14 +0000 |
commit | 8d7dcf14ff1097499d93a4793f34bbf78e3fde10 (patch) | |
tree | cd8ed08209d32f881cc54fe7452a16ee305e8860 /sbin/hastd/secondary.c | |
parent | 1706df7cfad3600db4ce7a02f51b29b79eb43ee8 (diff) | |
download | src-8d7dcf14ff1097499d93a4793f34bbf78e3fde10.tar.gz src-8d7dcf14ff1097499d93a4793f34bbf78e3fde10.zip |
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
Notes
Notes:
svn path=/head/; revision=219721
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 46fa6f33a661..218c8023df1d 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"); |