8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd88992 commit a2cb953Copy full SHA for a2cb953
supervisor/shared/web_workflow/websocket.c
@@ -52,6 +52,8 @@ typedef struct {
52
// interrupt character.
53
STATIC ringbuf_t _incoming_ringbuf;
54
STATIC uint8_t _buf[16];
55
+// make sure background is not called recursively
56
+STATIC bool in_web_background = false;
57
58
static _websocket cp_serial;
59
@@ -244,6 +246,10 @@ void websocket_background(void) {
244
246
if (!websocket_connected()) {
245
247
return;
248
}
249
+ if (in_web_background) {
250
+ return;
251
+ }
252
+ in_web_background = true;
253
uint8_t c;
254
while (ringbuf_num_empty(&_incoming_ringbuf) > 0 &&
255
_read_next_payload_byte(&c)) {
@@ -253,4 +259,5 @@ void websocket_background(void) {
259
260
ringbuf_put(&_incoming_ringbuf, c);
261
262
+ in_web_background = false;
256
263
0 commit comments