Skip to content

Commit abb3cbb

Browse files
authored
Merge pull request #10966 from dhalbert/fix-background-callback
remove improper clearing of callback state for web workflow background callback
2 parents 8df2418 + a5d1ac5 commit abb3cbb

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

supervisor/shared/workflow.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void supervisor_workflow_reset(void) {
4545
bool result = supervisor_start_web_workflow();
4646
if (result) {
4747
if (!workflow_background_cb.fun) {
48-
memset(&workflow_background_cb, 0, sizeof(workflow_background_cb));
48+
// Enable background callbacks if web_workflow startup successful.
4949
workflow_background_cb.fun = supervisor_web_workflow_background;
5050
}
5151
supervisor_workflow_request_background();
@@ -108,7 +108,6 @@ void supervisor_workflow_start(void) {
108108
#if CIRCUITPY_WEB_WORKFLOW
109109
if (supervisor_start_web_workflow()) {
110110
// Enable background callbacks if web_workflow startup successful.
111-
memset(&workflow_background_cb, 0, sizeof(workflow_background_cb));
112111
workflow_background_cb.fun = supervisor_web_workflow_background;
113112
// Kick the first background run now that the callback is installed.
114113
supervisor_workflow_request_background();

0 commit comments

Comments
 (0)