summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--bounce.c5
-rw-r--r--local.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/bounce.c b/bounce.c
index 604830a..6c3e285 100644
--- a/bounce.c
+++ b/bounce.c
@@ -484,6 +484,11 @@ int main(int argc, char *argv[]) {
 			if (!event.clients[i]) {
 				int fd;
 				struct tls *tls = localAccept(&fd, event.fds[i].fd);
+				if (!tls) {
+					warn("accept");
+					continue;
+				}
+
 				int error = tls_handshake(tls);
 				if (error) {
 					warnx("tls_handshake: %s", tls_error(tls));
diff --git a/local.c b/local.c
index a4de1bc..0a140e6 100644
--- a/local.c
+++ b/local.c
@@ -205,7 +205,7 @@ static int recvfd(int sock) {
 
 struct tls *localAccept(int *fd, int bind) {
 	*fd = accept(bind, NULL, NULL);
-	if (*fd < 0) err(EX_IOERR, "accept");
+	if (*fd < 0) return NULL;
 
 	if (unix) {
 		int sent = recvfd(*fd);
-f html -o anchorJune McEnroe Running hi twice to insert stuff between the head and the content is a bit of a hack but oh well. 2019-02-17Add hi -f html -o anchor for line number linksJune McEnroe 2019-02-17Simplify temp trap in upJune McEnroe 2019-02-17Add line numbers to hiJune McEnroe Renames previous -n option to -m to stay consistent with cat -n. Prefixing lines with line numbers affects where the first tab indent ends up relative to the text above it. Not sure if it's worth fixing somehow. 2019-02-17Always split spans after newlinesJune McEnroe Simplifies ANSI and IRC output code, and prepares for line numbered output. 2019-02-15Color format specifiers light cyan in vimJune McEnroe 2019-02-15Highlight Interp as yellowJune McEnroe 2019-02-15Highlight strings in sh command substitutionsJune McEnroe 2019-02-15Add nmap gpJune McEnroe 2019-02-14Avoid newline when copying URL to pasteboardJune McEnroe 2019-02-13Add forgotten "sixth" book of H2G2June McEnroe