diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2014-07-11 16:43:34 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2014-07-11 16:43:34 +0000 |
commit | d86f69039af3dee1bcbb1223b4de6478cc00fd2f (patch) | |
tree | e24a1456519126fcabb1f442a4da2fccff69fb37 /usr.sbin/ldpd/control.c | |
parent | 35d0dfe517a0ad6ff9db41676cd757261bd10ac0 (diff) |
Close the control fd when it has reported EOF.
ok henning@
Diffstat (limited to 'usr.sbin/ldpd/control.c')
-rw-r--r-- | usr.sbin/ldpd/control.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ldpd/control.c b/usr.sbin/ldpd/control.c index d17e945e2be..7a16254619d 100644 --- a/usr.sbin/ldpd/control.c +++ b/usr.sbin/ldpd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.13 2013/11/26 11:59:38 henning Exp $ */ +/* $OpenBSD: control.c,v 1.14 2014/07/11 16:43:33 krw Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -209,7 +209,7 @@ control_dispatch_imsg(int fd, short event, void *bula) } } if (event & EV_WRITE) { - if (msgbuf_write(&c->iev.ibuf.w) == -1 && errno != EAGAIN) { + if (msgbuf_write(&c->iev.ibuf.w) <= 0 && errno != EAGAIN) { control_close(fd); return; } |