summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/relayd/relay.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/relayd/relay.c b/usr.sbin/relayd/relay.c
index baa9f697972..21cbc69750e 100644
--- a/usr.sbin/relayd/relay.c
+++ b/usr.sbin/relayd/relay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: relay.c,v 1.93 2008/07/16 14:49:44 reyk Exp $ */
+/* $OpenBSD: relay.c,v 1.94 2008/07/16 15:02:19 reyk Exp $ */
/*
* Copyright (c) 2006, 2007, 2008 Reyk Floeter <reyk@openbsd.org>
@@ -2178,7 +2178,8 @@ relay_bindany(int fd, short event, void *arg)
return;
}
- relay_connect((struct session *)con);
+ if (relay_connect((struct session *)con) == -1)
+ relay_close(con, "session failed");
}
int