Skip to content

Commit

Permalink
[#292] Print current time when gateway lost connection
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSomeMan committed May 28, 2024
1 parent 976da1b commit d86e091
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/wifi_manager_handle_msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,17 @@ wifi_handle_ev_sta_disconnected(const wifiman_msg_param_t* const p_param)
}
else
{
LOG_INFO("lost connection");
time_t cur_time = time(NULL);
struct tm tm_time = { 0 };
gmtime_r(&cur_time, &tm_time);
LOG_INFO(
"[%04u-%02u-%02u %02u:%02u:%02u] lost connection",
tm_time.tm_year + 1900,
tm_time.tm_mon + 1,
tm_time.tm_mday,
tm_time.tm_hour,
tm_time.tm_min,
tm_time.tm_sec);
update_reason_code = UPDATE_LOST_CONNECTION;
wifi_handle_ev_sta_handle_lost_connection(event_bits);
}
Expand Down

0 comments on commit d86e091

Please sign in to comment.