diff options
author | June McEnroe <june@causal.agency> | 2019-11-02 04:04:39 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-11-02 04:04:39 -0400 |
commit | 868d2a69a793351698a771644f1cb65a6af88c4b (patch) | |
tree | 7def164ee90d464ae7655b247c120b814eddcfde | |
parent | Document pounce -U flag (diff) | |
download | pounce-868d2a69a793351698a771644f1cb65a6af88c4b.tar.gz pounce-868d2a69a793351698a771644f1cb65a6af88c4b.zip |
Don't try to sendfd if connect failed
Diffstat (limited to '')
-rw-r--r-- | dispatch.c | 6 |
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); |