Skip to content

Commit 5855dd5

Browse files
committed
examples: print info about dhcp delay for non-dhcp users
1 parent 792541d commit 5855dd5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

examples/demo_service/service.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,10 @@ http::Response handle_request(const http::Request& req)
8282
void Service::start(const std::string&)
8383
{
8484
// DHCP on interface 0
85+
printf("*** Waiting up to 10 sec. for DHCP... ***\n");
8586
auto& inet = net::Inet4::ifconfig(5.0, [](bool timeout) {
8687
if (timeout) {
88+
printf("*** Falling back to static network config ***\n");
8789
// static IP in case DHCP fails
8890
net::Inet4::stack().network_config(
8991
{ 10,0,0,42 }, // IP

0 commit comments

Comments
 (0)