File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
supervisor/shared/web_workflow Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,8 @@ typedef struct {
52
52
// interrupt character.
53
53
STATIC ringbuf_t _incoming_ringbuf ;
54
54
STATIC uint8_t _buf [16 ];
55
+ // make sure background is not called recursively
56
+ STATIC bool in_web_background = false;
55
57
56
58
static _websocket cp_serial ;
57
59
@@ -244,6 +246,10 @@ void websocket_background(void) {
244
246
if (!websocket_connected ()) {
245
247
return ;
246
248
}
249
+ if (in_web_background ) {
250
+ return ;
251
+ }
252
+ in_web_background = true;
247
253
uint8_t c ;
248
254
while (ringbuf_num_empty (& _incoming_ringbuf ) > 0 &&
249
255
_read_next_payload_byte (& c )) {
@@ -253,4 +259,5 @@ void websocket_background(void) {
253
259
}
254
260
ringbuf_put (& _incoming_ringbuf , c );
255
261
}
262
+ in_web_background = false;
256
263
}
You can’t perform that action at this time.
0 commit comments