diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2010-02-18 14:02:17 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2010-02-18 14:02:17 +0000 |
commit | c2f3047a720f3016940c413f997174d019845ad6 (patch) | |
tree | d4bcce28a1b2ebe8949313f5d23e383b5e6dd7b7 | |
parent | b643a5d8f63bcdf3f808f595ef8869ee2021008b (diff) |
Do an event_del before event_set/event_add in case we double add
something here as well.
ok claudio@ phessler@
-rw-r--r-- | usr.sbin/relayd/check_tcp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/relayd/check_tcp.c b/usr.sbin/relayd/check_tcp.c index 726b746a11b..f88fa8b295b 100644 --- a/usr.sbin/relayd/check_tcp.c +++ b/usr.sbin/relayd/check_tcp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: check_tcp.c,v 1.35 2009/08/07 11:10:23 reyk Exp $ */ +/* $OpenBSD: check_tcp.c,v 1.36 2010/02/18 14:02:16 jsg Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -99,6 +99,7 @@ check_tcp(struct ctl_tcp_event *cte) cte->buf = NULL; cte->host->up = HOST_UP; + event_del(&cte->ev); event_set(&cte->ev, s, EV_TIMEOUT|EV_WRITE, tcp_write, cte); event_add(&cte->ev, &tv); return; |