Skip to content

Commit

Permalink
Fix udp bind error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
svpcom committed Sep 25, 2024
1 parent 7d9367a commit 340e699
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wifibroadcast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ int open_udp_socket_for_rx(int port, int rcv_buf_size, uint32_t bind_addr, int s
if (::bind(fd, (struct sockaddr *) &saddr, sizeof(saddr)) < 0)
{
close(fd);
throw runtime_error(string_format("Bind error: %s", strerror(errno)));
throw runtime_error(string_format("Unable to bind to %s:%d : %s", inet_ntoa(saddr.sin_addr), port, strerror(errno)));
}
return fd;
}

0 comments on commit 340e699

Please sign in to comment.