Fix control socket leak when worker process exits.

Submitted by:	Mikolaj Golub <to.my.trociny@gmail.com>
MFC after:	3 days
This commit is contained in:
Pawel Jakub Dawidek 2010-04-16 06:47:29 +00:00
parent 4076170459
commit 09398e9bd4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=206696

View File

@ -137,6 +137,7 @@ child_exit(void)
pjdlog_error("Worker process failed (pid=%u, status=%d).",
(unsigned int)pid, WEXITSTATUS(status));
}
proto_close(res->hr_ctrl);
res->hr_workerpid = 0;
if (res->hr_role == HAST_ROLE_PRIMARY) {
sleep(1);