summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--bounce.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/bounce.c b/bounce.c
index 703c566..b96326b 100644
--- a/bounce.c
+++ b/bounce.c
@@ -174,10 +174,17 @@ int main(int argc, char *argv[]) {
 			if (i < binds) {
 				int fd;
 				struct tls *tls = listenAccept(&fd, event.fds[i].fd);
-				eventAdd(fd, clientAlloc(tls));
-				// FIXME: This should only be done after a successful client
-				// registration.
-				if (!clients++) serverFormat("AWAY\r\n");
+				int error = tls_handshake(tls);
+				if (error) {
+					warnx("tls_handshake: %s", tls_error(tls));
+					tls_free(tls);
+					close(fd);
+				} else {
+					eventAdd(fd, clientAlloc(tls));
+					// FIXME: This should only be done after a successful
+					// client registration.
+					if (!clients++) serverFormat("AWAY\r\n");
+				}
 				continue;
 			}
 
orus/commit/client.c?id=488513a14c5e5a378896d7cf4c2daa0803643367&follow=1'>Perform enter as two moves rather than a loopJune McEnroe 2017-07-31Track tile access countsJune McEnroe 2017-07-31Adjust move speed in clientJune McEnroe 2017-07-31Handle large movesJune McEnroe 2017-07-30Optimize builds for chrootJune McEnroe 2017-07-30Persist bright across color changesJune McEnroe 2017-07-30Add index.htmlJune McEnroe 2017-07-30Add snapshot.shJune McEnroe 2017-07-30Fix termcap patch for background colorsJune McEnroe 2017-07-30Update helpJune McEnroe 2017-07-30Fix help to track colorJune McEnroe 2017-07-30Support background colorsJune McEnroe 2017-07-30Track color only client-sideJune McEnroe 2017-07-30Add ostensible support for background colorsJune McEnroe 2017-07-30Add tile create and access timestampsJune McEnroe 2017-07-30Assert stable struct Tile field offsetsJune McEnroe 2017-07-30Add chroot.shJune McEnroe 2017-07-30Add ` commandJune McEnroe 2017-07-30Add sshd_configJune McEnroe 2017-07-30Add termcap patchJune McEnroe