From 12fa32a5de162735d9206ef8b1f7071f7aa2f055 Mon Sep 17 00:00:00 2001 From: Iurii Onishchenko Date: Fri, 10 Jan 2025 15:03:25 +0200 Subject: [PATCH] DIAL service improvement to handle zero size SSDP request. b/268088112 Change-Id: Icf349616bbf65bbf3408f54a9f5d27b8fdf7bf76 --- cobalt/network/dial/dial_udp_server.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cobalt/network/dial/dial_udp_server.cc b/cobalt/network/dial/dial_udp_server.cc index 7c1269b2dcdb..5c399ffa5168 100644 --- a/cobalt/network/dial/dial_udp_server.cc +++ b/cobalt/network/dial/dial_udp_server.cc @@ -126,7 +126,7 @@ void DialUdpServer::AcceptAndProcessConnection() { auto err_code = socket_->RecvFrom( read_buf_.get(), kReadBufferSize, &client_address_, base::Bind(&DialUdpServer::DidRead, base::Unretained(this))); - if (err_code > 0) { + if (err_code >= 0) { // RecvFrom can also return the number of received bytes right away as well. DidRead(err_code); } else if (err_code != net::ERR_IO_PENDING) {