summaryrefslogtreecommitdiffstats
path: root/sbin/hastd/proto.h
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2010-04-29 15:36:32 +0000
committerpjd <pjd@FreeBSD.org>2010-04-29 15:36:32 +0000
commit0dcf2ac7ada163fca882dcaa5c89ddfcef286bf9 (patch)
tree8e157b7fbed074af6570c80464a3a00cc302ae60 /sbin/hastd/proto.h
parent37a9ab0c6732ace50747a5e47b4eae9c67b72bba (diff)
downloadFreeBSD-src-0dcf2ac7ada163fca882dcaa5c89ddfcef286bf9.zip
FreeBSD-src-0dcf2ac7ada163fca882dcaa5c89ddfcef286bf9.tar.gz
Fix a problem where hastd will stuck in recv(2) after sending request to
secondary, which died between send(2) and recv(2). Do it by adding timeout to recv(2) for primary incoming and outgoing sockets and secondary outgoing socket. Reported by: Mikolaj Golub <to.my.trociny@gmail.com> Tested by: Mikolaj Golub <to.my.trociny@gmail.com> MFC after: 3 days
Diffstat (limited to 'sbin/hastd/proto.h')
-rw-r--r--sbin/hastd/proto.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sbin/hastd/proto.h b/sbin/hastd/proto.h
index cb196d8..13248ba 100644
--- a/sbin/hastd/proto.h
+++ b/sbin/hastd/proto.h
@@ -49,6 +49,7 @@ void proto_local_address(const struct proto_conn *conn, char *addr,
size_t size);
void proto_remote_address(const struct proto_conn *conn, char *addr,
size_t size);
+int proto_timeout(const struct proto_conn *conn, int timeout);
void proto_close(struct proto_conn *conn);
#endif /* !_PROTO_H_ */
OpenPOWER on IntegriCloud