Skip to content

Commit

Permalink
DIAL service improvement to handle zero size SSDP request.
Browse files Browse the repository at this point in the history
b/268088112

Change-Id: Icf349616bbf65bbf3408f54a9f5d27b8fdf7bf76
  • Loading branch information
iuriionishchenko committed Jan 10, 2025
1 parent 1f16618 commit 12fa32a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cobalt/network/dial/dial_udp_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 12fa32a

Please sign in to comment.