Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 954e1280 authored by Josh Gao's avatar Josh Gao
Browse files

adb: don't set has_write_error on success.

Whoops.

Test: adb_test
Change-Id: I32123c51446a22d4423eef0753b0a0b00b500a90
parent 7ab55713
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -126,13 +126,13 @@ static SocketFlushResult local_socket_flush_incoming(asocket* s) {
        } else if (rc == -1 && errno == EAGAIN) {
            fdevent_add(&s->fde, FDE_WRITE);
            return SocketFlushResult::TryAgain;
        }

        } else {
            // We failed to write, but it's possible that we can still read from the socket.
            // Give that a try before giving up.
            s->has_write_error = true;
            break;
        }
    }

    // If we sent the last packet of a closing socket, we can now destroy it.
    if (s->closing) {