s3: Slightly simplify the logic in smbd_server_echo_handler
[amitay/samba.git] / source3 / smbd / process.c
index 40319a59af0afc977ddb1ad478d5a1c42f4cc50d..ea9fb1c5c072062d2c18e661037376dbe4ca4395 100644 (file)
@@ -2349,9 +2349,12 @@ static void smbd_server_echo_handler(struct event_context *ev,
 
        if (flags & EVENT_FD_WRITE) {
                smbd_server_connection_write_handler(conn);
-       } else if (flags & EVENT_FD_READ) {
+               return;
+       }
+       if (flags & EVENT_FD_READ) {
                smbd_server_connection_read_handler(
                        conn, conn->smb1.echo_handler.trusted_fd);
+               return;
        }
 }