]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
socket-proxy: close correct fd, log at right log level
authorLennart Poettering <lennart@poettering.net>
Thu, 1 Oct 2020 20:20:42 +0000 (22:20 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 7 Oct 2020 07:40:02 +0000 (09:40 +0200)
src/socket-proxy/socket-proxyd.c

index 60420140696b4cba87be588336e06427eb5c0d61..9924220f03272840c428328a42124086089ef4da 100644 (file)
@@ -522,8 +522,8 @@ static int accept_cb(sd_event_source *s, int fd, uint32_t revents, void *userdat
 
                 r = add_connection_socket(context, nfd);
                 if (r < 0) {
-                        log_error_errno(r, "Failed to accept connection, ignoring: %m");
-                        safe_close(fd);
+                        log_warning_errno(r, "Failed to accept connection, ignoring: %m");
+                        safe_close(nfd);
                 }
         }