File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ void websocket_handoff(socketpool_socket_obj_t *socket) {
7878}
7979
8080bool websocket_connected (void ) {
81- return !cp_serial .closed && common_hal_socketpool_socket_get_connected (& cp_serial .socket );
81+ return _incoming_ringbuf . size > 0 && !cp_serial .closed && common_hal_socketpool_socket_get_connected (& cp_serial .socket );
8282}
8383
8484static bool _read_byte (uint8_t * c ) {
Original file line number Diff line number Diff line change 4848#endif
4949static background_callback_t workflow_background_cb ;
5050
51+ static bool workflow_started = false;
52+
5153static void workflow_background (void * data ) {
5254 #if CIRCUITPY_WEB_WORKFLOW
5355 supervisor_web_workflow_background ();
@@ -70,6 +72,9 @@ void supervisor_workflow_reset(void) {
7072}
7173
7274void supervisor_workflow_request_background (void ) {
75+ if (!workflow_started ) {
76+ return ;
77+ }
7378 background_callback_add_core (& workflow_background_cb );
7479}
7580
@@ -116,6 +121,8 @@ void supervisor_workflow_start(void) {
116121 #if CIRCUITPY_WEB_WORKFLOW
117122 supervisor_start_web_workflow ();
118123 #endif
124+
125+ workflow_started = true;
119126}
120127
121128FRESULT supervisor_workflow_mkdir_parents (FATFS * fs , char * path ) {
You can’t perform that action at this time.
0 commit comments