about 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
Diffstat (limited to '')
-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);