summary refs log tree commit diff
diff options
context:
space:
mode:
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);