Skip to content

Commit

Permalink
Webserver: fixed tx job backlog processing (caused WDT)
Browse files Browse the repository at this point in the history
  • Loading branch information
dexterbg committed Jul 27, 2019
1 parent 15194f2 commit 7bf1249
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -526,11 +526,18 @@ void OvmsWebServer::UpdateTicker(TimerHandle_t timer)
while (xQueuePeek(MyWebServer.m_client_backlog, &todo, 0) == pdTRUE) {
auto& slot = MyWebServer.m_client_slots[todo.client];
if (!slot.handler) {
// client is gone, discard job:
todo.job.clear(todo.client);
xQueueReceive(MyWebServer.m_client_backlog, &todo, 0);
}
else if (slot.handler->AddTxJob(todo.job)) {
// job has been queued, remove:
xQueueReceive(MyWebServer.m_client_backlog, &todo, 0);
}
else {
// job queue is full: abort backlog processing
break;
}
}

// trigger metrics update:
Expand Down

0 comments on commit 7bf1249

Please sign in to comment.