Use newly added descriptors_assert() function to ensure only expected
descriptors are open. MFC after: 1 week
This commit is contained in:
parent
579fd4b2ff
commit
f463896e5e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=218045
@ -837,6 +837,8 @@ hastd_primary(struct hast_resource *res)
|
||||
proto_recv(res->hr_ctrl, NULL, 0);
|
||||
descriptors_cleanup(res);
|
||||
|
||||
descriptors_assert(res, mode);
|
||||
|
||||
pjdlog_init(mode);
|
||||
pjdlog_prefix_set("[%s] (%s) ", res->hr_name, role2str(res->hr_role));
|
||||
setproctitle("%s (primary)", res->hr_name);
|
||||
|
@ -395,6 +395,8 @@ hastd_secondary(struct hast_resource *res, struct nv *nvin)
|
||||
proto_recv(res->hr_ctrl, NULL, 0);
|
||||
descriptors_cleanup(res);
|
||||
|
||||
descriptors_assert(res, mode);
|
||||
|
||||
pjdlog_init(mode);
|
||||
pjdlog_prefix_set("[%s] (%s) ", res->hr_name, role2str(res->hr_role));
|
||||
setproctitle("%s (secondary)", res->hr_name);
|
||||
|
Loading…
Reference in New Issue
Block a user