summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd/packet.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ldpd/packet.c')
-rw-r--r--usr.sbin/ldpd/packet.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/ldpd/packet.c b/usr.sbin/ldpd/packet.c
index 5b8b8bf260d..7e7e1d46149 100644
--- a/usr.sbin/ldpd/packet.c
+++ b/usr.sbin/ldpd/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.4 2010/02/25 17:40:46 claudio Exp $ */
+/* $OpenBSD: packet.c,v 1.5 2010/03/26 16:00:09 claudio Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -328,6 +328,7 @@ session_read(int fd, short event, void *arg)
sizeof(nbr->rbuf->buf) - nbr->rbuf->wpos)) == -1) {
if (errno != EINTR && errno != EAGAIN) {
/* XXX find better error */
+ event_del(&nbr->rev);
session_shutdown(nbr, S_SHUTDOWN, 0, 0);
return;
}
@@ -464,6 +465,7 @@ session_close(struct nbr *nbr)
inet_ntoa(nbr->id));
evbuf_clear(&nbr->wbuf);
+ event_del(&nbr->rev);
if (evtimer_pending(&nbr->keepalive_timer, NULL))
evtimer_del(&nbr->keepalive_timer);