summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-11-02 04:04:39 -0400
committerJune McEnroe <june@causal.agency>2019-11-02 04:04:39 -0400
commit868d2a69a793351698a771644f1cb65a6af88c4b (patch)
tree7def164ee90d464ae7655b247c120b814eddcfde
parentDocument pounce -U flag (diff)
downloadpounce-868d2a69a793351698a771644f1cb65a6af88c4b.tar.gz
pounce-868d2a69a793351698a771644f1cb65a6af88c4b.zip
Don't try to sendfd if connect failed
-rw-r--r--dispatch.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/dispatch.c b/dispatch.c
index 3f28e7f..f5a83c6 100644
--- a/dispatch.c
+++ b/dispatch.c
@@ -263,8 +263,10 @@ int main(int argc, char *argv[]) {
 #endif
 			if (error) warn("%s", name);
 
-			len = sendfd(sock, event.ptr[i].fd);
-			if (len < 0) warn("%s", name);
+			if (!error) {
+				len = sendfd(sock, event.ptr[i].fd);
+				if (len < 0) warn("%s", name);
+			}
 
 			close(sock);
 			eventRemove(i);
0:34:51 -0400'>2022-06-03Stop polling stdin after EOFJune McEnroe 2022-06-02Set TABSIZE=4June McEnroe 2022-06-02Do basic match highlightingJune McEnroe 2022-06-02Clean up parsing a littleJune McEnroe 2022-06-02Don't duplicate path stringJune McEnroe 2022-06-02Use stderr instead of /dev/tty, realloc buffer if lines too longJune McEnroe 2022-06-02Add initial working version of qfJune McEnroe 2022-05-29Set prompt for okshJune McEnroe