Skip to content

Commit f9b9f55

Browse files
authored
Merge pull request #6744 from tannewt/wifi_retry_fix
Fix retries after successful connection.
2 parents 3347ee6 + f9d724c commit f9b9f55

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ports/espressif/common-hal/wifi/Radio.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,9 @@ wifi_radio_error_t common_hal_wifi_radio_connect(wifi_radio_obj_t *self, uint8_t
336336
return WIFI_RADIO_ERROR_NO_AP_FOUND;
337337
}
338338
return self->last_disconnect_reason;
339+
} else {
340+
// We're connected, allow us to retry if we get disconnected.
341+
self->retries_left = self->starting_retries;
339342
}
340343
return WIFI_RADIO_ERROR_NONE;
341344
}

supervisor/shared/web_workflow/websocket.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,6 @@ static void _websocket_send(_websocket *ws, const char *text, size_t len) {
248248
_send_raw(&ws->socket, extended_len, 4);
249249
}
250250
_send_raw(&ws->socket, (const uint8_t *)text, len);
251-
char copy[len];
252-
memcpy(copy, text, len);
253-
copy[len] = '\0';
254251
}
255252

256253
void websocket_write(const char *text, size_t len) {

0 commit comments

Comments
 (0)