From f6b0372a1219746850f5ea7c7f5bcf31003a39d3 Mon Sep 17 00:00:00 2001 From: alexanderbobrovnik <136349302+alexanderbobrovnik@users.noreply.github.com> Date: Wed, 25 Sep 2024 18:18:05 +0300 Subject: [PATCH] Add socket watcher closure if no pending operations (#4121) b/348241402 --- net/socket/tcp_socket_starboard.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/socket/tcp_socket_starboard.cc b/net/socket/tcp_socket_starboard.cc index c3c6bc5d7cec..c1898934c695 100644 --- a/net/socket/tcp_socket_starboard.cc +++ b/net/socket/tcp_socket_starboard.cc @@ -290,6 +290,8 @@ void TCPSocketStarboard::OnSocketReadyToRead(SbSocket socket) { } } else if (read_pending()) { DidCompleteRead(); + } else { + ClearWatcherIfOperationsNotPending(); } }