From 7f8feee0e486d5f0224d12ea1a9f15a3ffa93a8e 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 e87f81520d6a..0fdd752ae130 100644 --- a/net/socket/tcp_socket_starboard.cc +++ b/net/socket/tcp_socket_starboard.cc @@ -292,6 +292,8 @@ void TCPSocketStarboard::OnSocketReadyToRead(SbSocket socket) { } } else if (read_pending()) { DidCompleteRead(); + } else { + ClearWatcherIfOperationsNotPending(); } }